| @@ 298-307 (lines=10) @@ | ||
| 295 | * The button names to insert before that button | |
| 296 | * @return bool True if insertion occured, false if it did not (because the given button name was not found) | |
| 297 | */ | |
| 298 | 	public function insertButtonsBefore($before, $buttons) { | |
| 299 |         if(func_num_args() > 2) { | |
| 300 | $buttons = func_get_args(); | |
| 301 | array_shift($buttons); | |
| 302 | } | |
| 303 |         if(!is_array($buttons)) { | |
| 304 | $buttons = [$buttons]; | |
| 305 | } | |
| 306 | return $this->modifyButtons($before, 0, 0, $buttons); | |
| 307 | } | |
| 308 | ||
| 309 | /** | |
| 310 | * Insert buttons after the first occurance of another button | |
| @@ 316-325 (lines=10) @@ | ||
| 313 | * The button names to insert after that button | |
| 314 | * @return bool True if insertion occured, false if it did not (because the given button name was not found) | |
| 315 | */ | |
| 316 | 	public function insertButtonsAfter($after, $buttons) { | |
| 317 | 		if(func_num_args() > 2) { | |
| 318 | $buttons = func_get_args(); | |
| 319 | array_shift($buttons); | |
| 320 | } | |
| 321 |         if(!is_array($buttons)) { | |
| 322 | $buttons = [$buttons]; | |
| 323 | } | |
| 324 | return $this->modifyButtons($after, 1, 0, $buttons); | |
| 325 | } | |
| 326 | ||
| 327 | /** | |
| 328 | * Remove the first occurance of buttons | |
| @@ 332-342 (lines=11) @@ | ||
| 329 | * @param string $buttons,... one or more strings - the name of the buttons to remove | |
| 330 | * @return null | |
| 331 | */ | |
| 332 | 	public function removeButtons($buttons) { | |
| 333 |         if(func_num_args() > 1) { | |
| 334 | $buttons = func_get_args(); | |
| 335 | } | |
| 336 |         if(!is_array($buttons)) { | |
| 337 | $buttons = [$buttons]; | |
| 338 | } | |
| 339 | 		foreach ($buttons as $button) { | |
| 340 | $this->modifyButtons($button, 0, 1); | |
| 341 | } | |
| 342 | } | |
| 343 | ||
| 344 | /** | |
| 345 | * Generate the JavaScript that will set TinyMCE's configuration: | |