protected function WebformUiEntityElementsForm::getTableHeader in Webform 6.x
Same name and namespace in other branches
- 8.5 modules/webform_ui/src/WebformUiEntityElementsForm.php \Drupal\webform_ui\WebformUiEntityElementsForm::getTableHeader()
Gets the elements table header.
Return value
array The header elements.
1 call to WebformUiEntityElementsForm::getTableHeader()
- WebformUiEntityElementsForm::buildForm in modules/
webform_ui/ src/ WebformUiEntityElementsForm.php - Form constructor.
File
- modules/
webform_ui/ src/ WebformUiEntityElementsForm.php, line 351
Class
- WebformUiEntityElementsForm
- Webform manage elements UI form.
Namespace
Drupal\webform_uiCode
protected function getTableHeader() {
/** @var \Drupal\webform\WebformInterface $webform */
$webform = $this
->getEntity();
$header = [];
$header['title'] = $this
->t('Title');
if ($webform
->hasContainer()) {
$header['add'] = [
'data' => '',
'class' => [
'webform-ui-element-operations',
],
];
}
$header['key'] = [
'data' => $this
->t('Key'),
'class' => [
RESPONSIVE_PRIORITY_LOW,
],
];
$header['type'] = [
'data' => $this
->t('Type'),
'class' => [
RESPONSIVE_PRIORITY_LOW,
],
];
if ($webform
->hasFlexboxLayout()) {
$header['flex'] = [
'data' => $this
->t('Flex'),
'class' => [
RESPONSIVE_PRIORITY_LOW,
],
];
}
if ($webform
->hasConditions()) {
$header['conditions'] = [
'data' => $this
->t('Conditional'),
'class' => [
RESPONSIVE_PRIORITY_LOW,
],
];
}
$header['required'] = [
'data' => $this
->t('Required'),
'class' => [
'webform-ui-element-required',
RESPONSIVE_PRIORITY_LOW,
],
];
$header['weight'] = [
'data' => $this
->t('Weight'),
'class' => [
'webform-tabledrag-hide',
],
];
$header['parent'] = [
'data' => $this
->t('Parent'),
'class' => [
'webform-tabledrag-hide',
],
];
$header['operations'] = [
'data' => $this
->t('Operations'),
'class' => [
'webform-ui-element-operations',
],
];
return $header;
}