BlockContent.php

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

Namespace

Drupal\block_content\Plugin\views\wizard

File

core/modules/block_content/src/Plugin/views/wizard/BlockContent.php

View source
<?php

namespace Drupal\block_content\Plugin\views\wizard;

use Drupal\views\Plugin\views\wizard\WizardPluginBase;

/**
 * Used for creating 'block_content' views with the wizard.
 *
 * @ViewsWizard(
 *   id = "block_content",
 *   base_table = "block_content_field_data",
 *   title = @Translation("Custom Block"),
 * )
 */
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;
    }

}

Classes

Title Deprecated Summary
BlockContent Used for creating 'block_content' views with the wizard.

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