class BlockContent

Same name in this branch
  1. 9 core/modules/block_content/src/Entity/BlockContent.php \Drupal\block_content\Entity\BlockContent
  2. 9 core/modules/block_content/src/Plugin/Derivative/BlockContent.php \Drupal\block_content\Plugin\Derivative\BlockContent
Same name and namespace in other branches
  1. 11.x core/modules/block_content/src/Entity/BlockContent.php \Drupal\block_content\Entity\BlockContent
  2. 11.x core/modules/block_content/src/Plugin/views/wizard/BlockContent.php \Drupal\block_content\Plugin\views\wizard\BlockContent
  3. 11.x core/modules/block_content/src/Plugin/Derivative/BlockContent.php \Drupal\block_content\Plugin\Derivative\BlockContent
  4. 10 core/modules/block_content/src/Entity/BlockContent.php \Drupal\block_content\Entity\BlockContent
  5. 10 core/modules/block_content/src/Plugin/views/wizard/BlockContent.php \Drupal\block_content\Plugin\views\wizard\BlockContent
  6. 10 core/modules/block_content/src/Plugin/Derivative/BlockContent.php \Drupal\block_content\Plugin\Derivative\BlockContent
  7. 8.9.x core/modules/block_content/src/Entity/BlockContent.php \Drupal\block_content\Entity\BlockContent
  8. 8.9.x core/modules/block_content/src/Plugin/views/wizard/BlockContent.php \Drupal\block_content\Plugin\views\wizard\BlockContent
  9. 8.9.x core/modules/block_content/src/Plugin/Derivative/BlockContent.php \Drupal\block_content\Plugin\Derivative\BlockContent

Used for creating 'block_content' views with the wizard.

Plugin annotation


@ViewsWizard(
  id = "block_content",
  base_table = "block_content_field_data",
  title = @Translation("Custom Block"),
)

Hierarchy

Expanded class hierarchy of BlockContent

File

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

Namespace

Drupal\block_content\Plugin\views\wizard
View source
class BlockContent extends WizardPluginBase {
  
  /**
   * {@inheritdoc}
   */
  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.