public function BUEditorToolbarWrapper::remove in BUEditor 8.2
Same name and namespace in other branches
- 8 src/BUEditorToolbarWrapper.php \Drupal\bueditor\BUEditorToolbarWrapper::remove()
Removes an item or a list of items.
File
- src/
BUEditorToolbarWrapper.php, line 88
Class
- BUEditorToolbarWrapper
- Defines a class that manages BUEditor toolbar data.
Namespace
Drupal\bueditorCode
public function remove($id) {
$ids = is_array($id) ? $id : [
$id,
];
$this->toolbar = array_diff($this->toolbar, $ids);
foreach ($ids as $id) {
unset($this->assocToolbar[$id]);
}
return $this;
}