31 if (!$this->hasTemplate()) {
32 $this->
setTemplate(
'Magento_Backend::widget/button/split.phtml');
44 $title = $this->getTitle();
46 $title = $this->getLabel();
50 $classes[] =
'actions-split';
53 if ($this->getButtonClass()) {
54 $classes[] = $this->getButtonClass();
71 $disabled = $this->getDisabled() ?
'disabled' :
'';
72 $title = $this->getTitle();
74 $title = $this->getLabel();
77 $classes[] =
'action-default';
78 $classes[] =
'primary';
80 if ($this->getClass()) {
81 $classes[] = $this->getClass();
84 $classes[] = $disabled;
87 'id' => $this->
getId() .
'-button',
89 'class' => join(
' ', $classes),
90 'disabled' => $disabled,
91 'style' => $this->getStyle(),
95 if ($this->getDataAttribute()) {
112 $disabled = $this->getDisabled() ?
'disabled' :
'';
113 $title = $this->getTitle();
115 $title = $this->getLabel();
118 $classes[] =
'action-toggle';
119 $classes[] =
'primary';
120 if ($this->getClass()) {
121 $classes[] = $this->getClass();
124 $classes[] = $disabled;
127 $attributes = [
'title' =>
$title,
'class' => join(
' ', $classes),
'disabled' => $disabled];
131 $html .= $this->
getUiId(
'dropdown');
146 $disabled = isset(
$option[
'disabled']) &&
$option[
'disabled'] ?
'disabled' :
'';
154 if (!empty(
$option[
'default'])) {
155 $classes[] =
'item-default';
158 $classes[] = $disabled;
176 return $this->
hasData(
'has_split') ? (bool)$this->
getData(
'has_split') :
true;
208 'class' => join(
' ', $classes),
211 'disabled' => $disabled,
214 if (isset(
$option[
'data_attribute'])) {
230 foreach (
$attributes as $attributeKey => $attributeValue) {
231 if ($attributeValue ===
null || $attributeValue ==
'') {
234 $html[] = $attributeKey .
'="' . $this->
escapeHtmlAttr($attributeValue,
false) .
'"';
236 return join(
' ', $html);
getData($key='', $index=null)
getUiId($arg1=null, $arg2=null, $arg3=null, $arg4=null, $arg5=null)
escapeHtmlAttr($string, $escapeSingleQuote=true)