You are here

layout_section_classes.module in Layout Section Classes 8

Module file.

File

layout_section_classes.module
View source
<?php

/**
 * @file
 * Module file.
 */
use Drupal\layout_section_classes\ClassyLayout;

/**
 * Implements hook_layouts_alter().
 */
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);
    }
  }
}

Functions

Namesort descending Description
layout_section_classes_layout_alter Implements hook_layouts_alter().