function DisplayModeLocalAction::getOptions
Same name in other branches
- 11.x core/modules/field_ui/src/DisplayModeLocalAction.php \Drupal\field_ui\DisplayModeLocalAction::getOptions()
Overrides LocalActionDefault::getOptions
File
-
core/
modules/ field_ui/ src/ DisplayModeLocalAction.php, line 18
Class
- DisplayModeLocalAction
- Defines a local action plugin with modal dialog.
Namespace
Drupal\field_uiCode
public function getOptions(RouteMatchInterface $route_match) {
$options = parent::getOptions($route_match);
$options = NestedArray::mergeDeepArray([
[
'attributes' => [
'class' => [
'button',
'use-ajax',
],
'data-dialog-type' => 'modal',
'data-dialog-options' => Json::encode([
'width' => '880',
]),
],
],
$options,
]);
return $options;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.