You are here

public static function Pattern::processUse in UI Patterns 8

Process use property.

Parameters

array $element: Render array.

Return value

array Render array.

File

src/Element/Pattern.php, line 132

Class

Pattern
Renders a pattern element.

Namespace

Drupal\ui_patterns\Element

Code

public static function processUse(array $element) {
  $definition = UiPatterns::getPatternDefinition($element['#id']);
  if ($definition
    ->hasUse()) {
    $element['#use'] = $definition
      ->getUse();
  }
  return $element;
}