Skip to content
Snippets Groups Projects

Declare $searchFilterPresent property

Merged notfloran requested to merge issue/views_search_snippet-3464679:3464679-php-8.2 into 2.x
1 file
+ 4
2
Compare changes
  • Side-by-side
  • Inline
@@ -17,6 +17,8 @@ use Drupal\views\ResultRow;
*/
class Snippet extends FieldPluginBase {
private $searchFilterPresent = FALSE;
/**
* {@inheritdoc}
*/
@@ -45,7 +47,7 @@ class Snippet extends FieldPluginBase {
*/
public function render(ResultRow $values) {
// Only render if we exist.
if (isset($this->searchFilterPresent)) {
if ($this->searchFilterPresent) {
$node_renderer = \Drupal::entityTypeManager()->getViewBuilder('node');
$node = $this->getEntity($values);
//Todo:langcode
@@ -65,4 +67,4 @@ class Snippet extends FieldPluginBase {
}
}
\ No newline at end of file
}
Loading