src/Forms/HTMLEditor/TinyMCEConfig.php
protected function modifyButtons($name, $offset, $del = 0, $add = null)
    {
        foreach ($this->buttons as &$buttons) {
            if (($idx = array_search($name, $buttons)) !== false) {
                if ($add) {
                    array_splice($buttons, $idx + $offset, $del, $add);
                } else {
                    array_splice($buttons, $idx + $offset, $del);
                }
                return true;
            }
        }
        return false;
    }
protected function modifyButtons($name, $offset, $del = 0, $add = null)
    {
        foreach ($this->buttons as &$buttons) {
            if (($idx = array_search($name, $buttons)) !== false) {
                if ($add) {
                    array_splice($buttons, $idx + $offset, $del, $add);
                } else {
                    array_splice($buttons, $idx + $offset, $del);
                }
                return true;
            }
        }
        return false;
    }
protected function modifyButtons ( $ name , $ offset , $ del = 0 , $ add = null ) { foreach ( $ this -> buttons as & $ buttons ) { if ( ( $ idx = array_search ( $ name , $ buttons ) ) !== false ) { if ( $ add ) { array_splice ( $ buttons , $ idx + $ offset , $ del , $ add ) ; } else { array_splice ( $ buttons , $ idx + $ offset , $ del ) ; } return true ; } } return false ; }
Internal function for adding and removing buttons related to another button
@param string $name The name of the button to modify
@param int $offset The offset relative to that button to perform an array_splice at.
0 for before $name, 1 for after.
@param int $del The number of buttons to remove at the position given by index(string) + offset
@param mixed $add An array or single item to insert at the position given by index(string) + offset,
or null for no insertion
@return bool True if $name matched a button, false otherwise
Internal function for adding and removing buttons related to another button