You are here

public function YamlFormElementBase::getAdminLabel in YAML Form 8

Get an element's admin label (#admin_title, #title or #yamlform_key).

Parameters

array $element: An element.

Return value

string An element's label (#admin_title, #title or #yamlform_key).

Overrides YamlFormElementInterface::getAdminLabel

14 calls to YamlFormElementBase::getAdminLabel()
DateList::getElementSelectorInputsOptions in src/Plugin/YamlFormElement/DateList.php
Get an element's (sub)inputs selectors as options.
DateTime::getElementSelectorInputsOptions in src/Plugin/YamlFormElement/DateTime.php
Get an element's (sub)inputs selectors as options.
Details::getElementSelectorOptions in src/Plugin/YamlFormElement/Details.php
Get an element's selectors as options.
OptionsBase::getElementSelectorInputsOptions in src/Plugin/YamlFormElement/OptionsBase.php
Get an element's (sub)inputs selectors as options.
PasswordConfirm::getElementSelectorInputsOptions in src/Plugin/YamlFormElement/PasswordConfirm.php
Get an element's (sub)inputs selectors as options.

... See full list

File

src/YamlFormElementBase.php, line 546

Class

YamlFormElementBase
Provides a base class for a form element.

Namespace

Drupal\yamlform

Code

public function getAdminLabel(array $element) {
  return $element['#admin_title'] ?: $element['#title'] ?: $element['#yamlform_key'];
}