You are here

protected function LibraryPattern::processTemplateProperty in UI Patterns 8

Process 'template' definition property.

Parameters

\Drupal\ui_patterns\Definition\PatternDefinition $definition: Pattern definition array.

Return value

array Processed hook definition portion.

1 call to LibraryPattern::processTemplateProperty()
LibraryPattern::getThemeImplementation in modules/ui_patterns_library/src/Plugin/UiPatterns/Pattern/LibraryPattern.php
Get theme implementation for current pattern.

File

modules/ui_patterns_library/src/Plugin/UiPatterns/Pattern/LibraryPattern.php, line 111

Class

LibraryPattern
The UI Pattern plugin.

Namespace

Drupal\ui_patterns_library\Plugin\UiPatterns\Pattern

Code

protected function processTemplateProperty(PatternDefinition $definition) {
  $return = [];
  if ($definition
    ->hasTemplate()) {
    $return = [
      'template' => $definition
        ->getTemplate(),
    ];
  }
  return $return;
}