protected function WebformActions::defineDefaultProperties in Webform 8.5
Same name and namespace in other branches
- 6.x src/Plugin/WebformElement/WebformActions.php \Drupal\webform\Plugin\WebformElement\WebformActions::defineDefaultProperties()
Define an element's default properties.
Return value
array An associative array contain an the element's default properties.
Overrides ContainerBase::defineDefaultProperties
File
- src/
Plugin/ WebformElement/ WebformActions.php, line 26
Class
- WebformActions
- Provides a 'webform_actions' element.
Namespace
Drupal\webform\Plugin\WebformElementCode
protected function defineDefaultProperties() {
$properties = [
// Title.
'title' => '',
// Attributes.
'attributes' => [],
] + $this
->defineDefaultBaseProperties();
$buttons = array_merge(WebformActionsElement::$buttons, [
'update',
]);
foreach ($buttons as $button) {
$properties[$button . '_hide'] = FALSE;
$properties[$button . '__label'] = '';
$properties[$button . '__attributes'] = [];
}
$properties['delete_hide'] = TRUE;
$properties['delete__dialog'] = FALSE;
return $properties;
}