You are here

public static function UiPatternsSettings::createSettingType in UI Patterns Settings 8.2

Same name and namespace in other branches
  1. 8 src/UiPatternsSettings.php \Drupal\ui_patterns_settings\UiPatternsSettings::createSettingType()

Create setting type plugin.

Parameters

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

\Drupal\ui_patterns_settings\Definition\PatternDefinitionSetting $setting_defintion: The setting definition.

Return value

\Drupal\ui_patterns_settings\Plugin\PatternSettingTypeInterface UI Patterns setting manager instance.

6 calls to UiPatternsSettings::createSettingType()
SettingsFormBuilder::displayForm in src/Form/SettingsFormBuilder.php
Build pattern settings for display form.
SettingsFormBuilder::layoutForm in src/Form/SettingsFormBuilder.php
Build pattern settings fieldset.
UiPatternsSettings::getExposedPatternDefinition in src/UiPatternsSettings.php
Exposed pattern setting definitions.
UiPatternsSettings::preprocess in src/UiPatternsSettings.php
Preprocess all settings variables.
UiPatternsSettings::preprocessExposedFields in src/UiPatternsSettings.php
Preprocess exposed settings variables.

... See full list

File

src/UiPatternsSettings.php, line 275

Class

UiPatternsSettings
UI Patterns setting factory class.

Namespace

Drupal\ui_patterns_settings

Code

public static function createSettingType(PatternDefinition $pattern_definition, PatternDefinitionSetting $setting_defintion) {
  $configuration = [];
  $configuration['pattern_setting_definition'] = $setting_defintion;
  $configuration['pattern_definition'] = $pattern_definition;
  return \Drupal::service('plugin.manager.ui_patterns_settings')
    ->createInstance($setting_defintion
    ->getType(), $configuration);
}