Skip to content

Commit

Permalink
EZP-30386: [Online Editor] Custom Buttons, implementing requested cha…
Browse files Browse the repository at this point in the history
…nges
  • Loading branch information
SerheyDolgushev committed Apr 3, 2019
1 parent 1cfce8b commit 68aab50
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions src/lib/UI/Config/Provider/FieldType/RichText/AlloyEditor.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,26 +39,22 @@ public function getConfig(): array
*/
protected function getExtraPlugins(): array
{
if (isset($this->alloyEditorConfiguration['extra_plugins'])) {
return $this->alloyEditorConfiguration['extra_plugins'];
}

return [];
return $this->alloyEditorConfiguration['extra_plugins'] ?? [];
}

/**
* This will be deprecated in eZ Platform 3.x.
* The alternative and more flexible solution will be introduced.
* So you will need to update Online Editor Extra Buttons as part of eZ Platform 3.x upgrade.
* @deprecated 3.0.0 The alternative and more flexible solution will be introduced.
* @deprecated 3.0.0 So you will need to update Online Editor Extra Buttons as part of eZ Platform 3.x upgrade.
*
* @return array Custom plugins
* @return array Custom buttons
*/
protected function getExtraButtons(): array
{
if (isset($this->alloyEditorConfiguration['extra_buttons'])) {
return $this->alloyEditorConfiguration['extra_buttons'];
}
trigger_error(
'"ezrichtext.alloy_editor.extra_buttons" is deprecated since v2.5.1. There will be new and more flexible solution to manage buttons in Online Editor in 3.0.0',
E_USER_DEPRECATED
);

return [];
return $this->alloyEditorConfiguration['extra_buttons'] ?? [];
}
}

0 comments on commit 68aab50

Please sign in to comment.