You are here

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

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

Create setting type plugin.

Parameters

\Drupal\ui_patterns_settings\Definition\PatternDefinitionSetting $settingDefintion: The setting defintion.

Return value

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

3 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::preprocess in src/UiPatternsSettings.php
Preprocess all settings variables.

File

src/UiPatternsSettings.php, line 110

Class

UiPatternsSettings
UI Patterns setting factory class.

Namespace

Drupal\ui_patterns_settings

Code

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