public function WebformElementBase::getAdminLabel in Webform 8.5
Same name and namespace in other branches
- 6.x src/Plugin/WebformElementBase.php \Drupal\webform\Plugin\WebformElementBase::getAdminLabel()
Get an element's admin label (#admin_title, #title or #webform_key).
Parameters
array $element: An element.
Return value
string An element's label (#admin_title, #title or #webform_key).
Overrides WebformElementInterface::getAdminLabel
17 calls to WebformElementBase::getAdminLabel()
- DateList::getElementSelectorInputsOptions in src/
Plugin/ WebformElement/ DateList.php - Get an element's (sub)inputs selectors as options.
- DateTime::getElementSelectorInputsOptions in src/
Plugin/ WebformElement/ DateTime.php - Get an element's (sub)inputs selectors as options.
- Details::getElementSelectorOptions in src/
Plugin/ WebformElement/ Details.php - Get an element's selectors as options.
- OptionsBase::getElementSelectorInputsOptions in src/
Plugin/ WebformElement/ OptionsBase.php - Get an element's (sub)inputs selectors as options.
- OptionsBase::getElementSelectorOptions in src/
Plugin/ WebformElement/ OptionsBase.php
File
- src/
Plugin/ WebformElementBase.php, line 1297
Class
- WebformElementBase
- Provides a base class for a webform element.
Namespace
Drupal\webform\PluginCode
public function getAdminLabel(array $element) {
$element += [
'#admin_title' => '',
'#title' => '',
'#webform_key' => '',
];
return $element['#admin_title'] ?: $element['#title'] ?: $element['#webform_key'];
}