Last active
August 29, 2015 14:14
-
-
Save muskie9/d7d7dba86df525494948 to your computer and use it in GitHub Desktop.
A way to create a tab and insert it after the last tab
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function getCMSFields(){ | |
$fields = parent::getCMSFields(); | |
$rootTab = $fields->fieldByName('Root'); | |
$this->extend('updateCMSFields', $fields); | |
$tabs = $rootTab->getTabSet(); | |
$last = $tabs->last()->name; | |
$rootTab->insertAfter(Tab::create('FoolashTab'), $last); | |
return $fields; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment