function BlockContent::getFilters

Same name and namespace in other branches
  1. 9 core/modules/block_content/src/Plugin/views/wizard/BlockContent.php \Drupal\block_content\Plugin\views\wizard\BlockContent::getFilters()
  2. 8.9.x core/modules/block_content/src/Plugin/views/wizard/BlockContent.php \Drupal\block_content\Plugin\views\wizard\BlockContent::getFilters()
  3. 10 core/modules/block_content/src/Plugin/views/wizard/BlockContent.php \Drupal\block_content\Plugin\views\wizard\BlockContent::getFilters()

Gets the filters property.

Return value

array An array of filters, keyed by filter ID, containing filter information.

Overrides WizardPluginBase::getFilters

File

core/modules/block_content/src/Plugin/views/wizard/BlockContent.php, line 22

Class

BlockContent
Used for creating 'block_content' views with the wizard.

Namespace

Drupal\block_content\Plugin\views\wizard

Code

public function getFilters() {
  $filters = parent::getFilters();
  $filters['reusable'] = [
    'id' => 'reusable',
    'plugin_id' => 'boolean',
    'table' => $this->base_table,
    'field' => 'reusable',
    'value' => '1',
    'entity_type' => $this->entityTypeId,
    'entity_field' => 'reusable',
  ];
  return $filters;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.