You are here

function hook_styleguide_alter in Style Guide 8

Same name and namespace in other branches
  1. 6 styleguide.api.php \hook_styleguide_alter()
  2. 7 styleguide.api.php \hook_styleguide_alter()
  3. 2.x styleguide.api.php \hook_styleguide_alter()

Alter styleguide elements.

Parameters

array &$items: An array of items to be displayed.

See also

hook_styleguide()

1 invocation of hook_styleguide_alter()
StyleguideController::page in src/Controller/StyleguideController.php
Build styleguide page.

File

./styleguide.api.php, line 16
Hooks for the Styleguide module.

Code

function hook_styleguide_alter(array &$items) {

  // Add a class to the text test.
  $items['text']['content'] = '<div class="mytestclass">' . $items['text']['content'] . '</div>';

  // Remove the headings tests.
  unset($items['headings']);
}