public function RulesUiConfigHandler::getComponentLabel in Rules 8.3
Gets the human-readable label of the component.
The human-readable label used when referring to the whole component. This can be a fixed string, or the label of a config entity.
Return value
string The label.
Overrides RulesUiHandlerInterface::getComponentLabel
File
- src/
Ui/ RulesUiConfigHandler.php, line 96
Class
- RulesUiConfigHandler
- The default handler for RulesUi plugins that store to config.
Namespace
Drupal\rules\UiCode
public function getComponentLabel() {
if (isset($this->pluginDefinition->component_label)) {
return $this->pluginDefinition->component_label;
}
elseif ($this
->getConfig() instanceof EntityInterface) {
return $this
->getConfig()
->label();
}
else {
return $this->pluginDefinition->component_type_label;
}
}