You are here

protected function PatternBase::processUseProperty in UI Patterns 8

Process 'use' definition property.

Parameters

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

Return value

array Processed hook definition portion.

1 call to PatternBase::processUseProperty()
PatternBase::getThemeImplementation in src/Plugin/PatternBase.php
Get theme implementation for current pattern.

File

src/Plugin/PatternBase.php, line 133

Class

PatternBase
Class PatternBase.

Namespace

Drupal\ui_patterns\Plugin

Code

protected function processUseProperty(PatternDefinition $definition) {
  $return = [];
  if ($definition
    ->hasUse()) {
    $return = [
      'path' => $this->moduleHandler
        ->getModule('ui_patterns')
        ->getPath() . '/templates',
      'template' => 'patterns-use-wrapper',
    ];
  }
  return $return;
}