You are here

protected function LayoutPluginAlter::setUp in Block Blacklist [Deprecated] 8

Configure variables based on configuration settings.

Overrides PluginAlter::setUp

File

src/LayoutPluginAlter.php, line 13

Class

LayoutPluginAlter
Implementation callbacks for layout builder plugin alter hooks.

Namespace

Drupal\block_blacklist

Code

protected function setUp() {
  $settings = $this->configFactory
    ->get('block_blacklist.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')) : '',
  ];
  $this->blacklistService
    ->setUp($options);
}