You are here

class LayoutPluginAlter in Block List Override 1.0.x

Implementation callbacks for layout builder plugin alter hooks.

Hierarchy

Expanded class hierarchy of LayoutPluginAlter

1 file declares its use of LayoutPluginAlter
LayoutController.php in src/Controller/LayoutController.php

File

src/LayoutPluginAlter.php, line 8

Namespace

Drupal\block_list_override
View source
class LayoutPluginAlter extends PluginAlter {

  /**
   * {@inheritdoc}
   */
  protected function setUp() {
    $settings = $this->configFactory
      ->get('block_list_override.settings');
    $options = [
      'match' => !empty($settings) ? trim($settings
        ->get('layout_match')) : '',
      'prefix' => !empty($settings) ? trim($settings
        ->get('layout_prefix')) : '',
      'regex' => !empty($settings) ? trim($settings
        ->get('layout_regex')) : '',
      'negate' => !empty($settings) ? $settings
        ->get('layout_negate') : 0,
    ];
    $this->listService
      ->setUp($options);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
LayoutPluginAlter::setUp protected function Configure variables based on configuration settings. Overrides PluginAlter::setUp
PluginAlter::$configFactory protected property The Config factory service.
PluginAlter::$entityTypeManager protected property The Entity Type Manager service.
PluginAlter::$listService protected property List service.
PluginAlter::alterBlocks public function Alters block definitions.
PluginAlter::create public static function Instantiates a new instance of this class. Overrides ContainerInjectionInterface::create
PluginAlter::__construct protected function PluginAlter constructor.