You are here

function layout_section_classes_layout_alter in Layout Section Classes 8

Implements hook_layouts_alter().

File

./layout_section_classes.module, line 13
Module file.

Code

function layout_section_classes_layout_alter(&$definitions) {

  /** @var \Drupal\Core\Layout\LayoutDefinition[] $definitions */
  foreach ($definitions as &$definition) {
    if ($definition
      ->get('classes') !== NULL) {
      $definition
        ->setClass(ClassyLayout::class);
    }
  }
}