You are here

function ui_patterns_settings_layout_alter in UI Patterns Settings 8

Same name and namespace in other branches
  1. 8.2 ui_patterns_settings.module \ui_patterns_settings_layout_alter()

Implements hook_layout_alter().

File

./ui_patterns_settings.module, line 101
Contains ui_patterns_settings.module.

Code

function ui_patterns_settings_layout_alter(&$definitions) {

  /** @var \Drupal\Core\Layout\LayoutDefinition $definition */
  foreach ($definitions as $definition) {
    if ($definition
      ->getClass() == '\\Drupal\\ui_patterns_layouts\\Plugin\\Layout\\PatternLayout') {
      $definition
        ->setClass(PatternSettingsLayout::class);
    }
  }
}