Source of file Blog.php
Size: 0,898 Bytes - Last Modified: 2021-12-23T10:52:49+00:00
/var/www/docs.ssmods.com/process/src/code/pages/Blog.php
12345678910111213141516171819202122232425262728293031323334353637383940 | <?php /** * Created by PhpStorm. * User: hadleelineham * Date: 22/02/19 * Time: 9:33 AM */ namespace Toast\News; use Toast\News\News; class Blog extends News { private static $singular_name = 'Blog'; private static $plural_name = 'Blog'; private static $description = 'Blog'; private static $table_name = 'Blog'; public function getCMSFields() { $fields = parent::getCMSFields(); $fields->removeByName(['Tags']); $main = $fields->fieldByName('Root')->fieldByName('ChildPages'); $main->setTitle('Posts'); $fields->dataFieldByName('ChildPages')->setTitle(''); // $field = ListboxField::create('Tags', 'Tags', TaxonomyTerm::get()->map('ID', 'Name')->toArray(), $this->Tags()); // $fields->addFieldToTab('Root.Tags', $field); return $fields; } } class BlogController extends NewsController { } |