Skip to content

Commit

Permalink
Changed reporting deprecation of ezrichtext.alloy_editor.extra_button
Browse files Browse the repository at this point in the history
Deprecation is now reported only if user is using this setting.
  • Loading branch information
alongosz committed Aug 22, 2019
1 parent bddd421 commit 6acd3d1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/lib/Configuration/Provider/AlloyEditor.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,17 @@ private function getExtraPlugins(): array
*/
private function getExtraButtons(): array
{
if (empty($this->alloyEditorConfiguration['extra_buttons'])) {
return [];
}

@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',
'"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 $this->alloyEditorConfiguration['extra_buttons'] ?? [];
return $this->alloyEditorConfiguration['extra_buttons'];
}

/**
Expand Down

0 comments on commit 6acd3d1

Please sign in to comment.