You are here

public static function UiPatternsSettingsManager::allowVariantToken in UI Patterns Settings 8.2

Returns TRUE if a variant token can configured.

Parameters

\Drupal\ui_patterns\Definition\PatternDefinition $pattern_definition: The pattern definition.

Return value

bool Returns TRUE if a variant token can configured.

2 calls to UiPatternsSettingsManager::allowVariantToken()
SettingsFormBuilder::displayForm in src/Form/SettingsFormBuilder.php
Build pattern settings for display form.
SettingsFormBuilder::layoutForm in src/Form/SettingsFormBuilder.php
Build pattern settings fieldset.

File

src/UiPatternsSettingsManager.php, line 39

Class

UiPatternsSettingsManager
Provides the UI Patterns Settings plugin manager.

Namespace

Drupal\ui_patterns_settings

Code

public static function allowVariantToken(PatternDefinition $pattern_definition) {
  $ary = $pattern_definition
    ->getAdditional();
  if (isset($ary['allow_variant_token']) && $ary['allow_variant_token'] === TRUE) {
    return TRUE;
  }
  else {
    return FALSE;
  }
}