public function PatternSourceBase::getSourceField in UI Patterns 8
Source field factory method.
Parameters
string $name: Machine name.
string $label: Human readable label.
Return value
\Drupal\ui_patterns\Definition\PatternSourceField Source field instance.
Overrides PatternSourceInterface::getSourceField
5 calls to PatternSourceBase::getSourceField()
- DsFieldSource::getSourceFields in modules/
ui_patterns_ds/ src/ Plugin/ UiPatterns/ Source/ DsFieldSource.php - Return list of source fields.
- DsFieldTemplateSource::getSourceFields in modules/
ui_patterns_ds/ src/ Plugin/ UiPatterns/ Source/ DsFieldTemplateSource.php - Return list of source fields.
- FieldSource::getSourceFields in src/
Plugin/ UiPatterns/ Source/ FieldSource.php - Return list of source fields.
- TestSource::getSourceFields in tests/
modules/ ui_patterns_field_source_test/ src/ Plugin/ UiPatterns/ Source/ TestSource.php - Return list of source fields.
- ViewsRowSource::getSourceFields in modules/
ui_patterns_views/ src/ Plugin/ UiPatterns/ Source/ ViewsRowSource.php - Return list of source fields.
File
- src/
Plugin/ PatternSourceBase.php, line 22
Class
- PatternSourceBase
- Base class for UI Patterns Source plugins.
Namespace
Drupal\ui_patterns\PluginCode
public function getSourceField($name, $label) {
return new PatternSourceField($name, $label, $this->pluginDefinition['id'], $this->pluginDefinition['label']);
}