class PatternSourceField in UI Patterns 8
Class PatternSourceField.
@package Drupal\ui_patterns\Definition
Hierarchy
- class \Drupal\ui_patterns\Definition\PatternSourceField
Expanded class hierarchy of PatternSourceField
1 file declares its use of PatternSourceField
- PatternSourceBase.php in src/
Plugin/ PatternSourceBase.php
File
- src/
Definition/ PatternSourceField.php, line 10
Namespace
Drupal\ui_patterns\DefinitionView source
class PatternSourceField {
const FIELD_KEY_SEPARATOR = ':';
/**
* Field name.
*
* @var string
*/
private $fieldName;
/**
* Field label.
*
* @var string
*/
private $fieldLabel;
/**
* Plugin ID.
*
* @var string
*/
private $pluginId;
/**
* Plugin label.
*
* @var string
*/
private $pluginLabel;
/**
* SourceField constructor.
*/
public function __construct($field_name, $field_label, $plugin_id, $plugin_label) {
$this->fieldName = $field_name;
$this->fieldLabel = $field_label;
$this->pluginId = $plugin_id;
$this->pluginLabel = $plugin_label;
}
/**
* Get FieldName property.
*
* @return string
* Property value.
*/
public function getFieldName() {
return $this->fieldName;
}
/**
* Set FieldName property.
*
* @param string $fieldName
* Property value.
*
* @return $this
*/
public function setFieldName($fieldName) {
$this->fieldName = $fieldName;
return $this;
}
/**
* Get FieldLabel property.
*
* @return string
* Property value.
*/
public function getFieldLabel() {
return $this->fieldLabel;
}
/**
* Set FieldLabel property.
*
* @param string $fieldLabel
* Property value.
*
* @return $this
*/
public function setFieldLabel($fieldLabel) {
$this->fieldLabel = $fieldLabel;
return $this;
}
/**
* Get Plugin property.
*
* @return string
* Property value.
*/
public function getPluginId() {
return $this->pluginId;
}
/**
* Set Plugin property.
*
* @param string $pluginId
* Property value.
*
* @return $this
*/
public function setPluginId($pluginId) {
$this->pluginId = $pluginId;
return $this;
}
/**
* Get PluginLabel property.
*
* @return string
* Property value.
*/
public function getPluginLabel() {
return $this->pluginLabel;
}
/**
* Set PluginLabel property.
*
* @param string $pluginLabel
* Property value.
*
* @return $this
*/
public function setPluginLabel($pluginLabel) {
$this->pluginLabel = $pluginLabel;
return $this;
}
/**
* Get unique field key.
*
* @return string
* Field key.
*/
public function getFieldKey() {
return $this
->getPluginId() . self::FIELD_KEY_SEPARATOR . $this
->getFieldName();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PatternSourceField:: |
private | property | Field label. | |
PatternSourceField:: |
private | property | Field name. | |
PatternSourceField:: |
private | property | Plugin ID. | |
PatternSourceField:: |
private | property | Plugin label. | |
PatternSourceField:: |
constant | |||
PatternSourceField:: |
public | function | Get unique field key. | |
PatternSourceField:: |
public | function | Get FieldLabel property. | |
PatternSourceField:: |
public | function | Get FieldName property. | |
PatternSourceField:: |
public | function | Get Plugin property. | |
PatternSourceField:: |
public | function | Get PluginLabel property. | |
PatternSourceField:: |
public | function | Set FieldLabel property. | |
PatternSourceField:: |
public | function | Set FieldName property. | |
PatternSourceField:: |
public | function | Set Plugin property. | |
PatternSourceField:: |
public | function | Set PluginLabel property. | |
PatternSourceField:: |
public | function | SourceField constructor. |