class UiPatterns in UI Patterns 8
UI Patterns factory class.
@package Drupal\ui_patterns
Hierarchy
- class \Drupal\ui_patterns\UiPatterns
Expanded class hierarchy of UiPatterns
6 files declare their use of UiPatterns
- Pattern.php in src/
Element/ Pattern.php - PatternPreview.php in src/
Element/ PatternPreview.php - UiPatternsManagerTest.php in tests/
src/ Kernel/ UiPatternsManagerTest.php - ui_patterns.module in ./
ui_patterns.module - Contains ui_patterns.module.
- ui_patterns_layouts.module in modules/
ui_patterns_layouts/ ui_patterns_layouts.module - Contains module file.
File
- src/
UiPatterns.php, line 10
Namespace
Drupal\ui_patternsView source
class UiPatterns {
/**
* Get pattern manager instance.
*
* @return \Drupal\ui_patterns\UiPatternsManager
* UI Patterns manager instance.
*/
public static function getManager() {
return \Drupal::service('plugin.manager.ui_patterns');
}
/**
* Get pattern field sources manager instance.
*
* @return \Drupal\ui_patterns\UiPatternsSourceManager
* UI Patterns field sources manager instance.
*/
public static function getSourceManager() {
return \Drupal::service('plugin.manager.ui_patterns_source');
}
/**
* Get pattern definition.
*
* @param string $id
* Pattern ID.
*
* @return \Drupal\ui_patterns\Definition\PatternDefinition
* Pattern object instance.
*/
public static function getPatternDefinition($id) {
return \Drupal::service('plugin.manager.ui_patterns')
->getDefinition($id);
}
/**
* Get pattern definitions.
*
* @return \Drupal\ui_patterns\Definition\PatternDefinition[]
* Pattern object instance.
*/
public static function getPatternDefinitions() {
return \Drupal::service('plugin.manager.ui_patterns')
->getDefinitions();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
UiPatterns:: |
public static | function | Get pattern manager instance. | |
UiPatterns:: |
public static | function | Get pattern definition. | |
UiPatterns:: |
public static | function | Get pattern definitions. | |
UiPatterns:: |
public static | function | Get pattern field sources manager instance. |