Source of file TestTagFieldPage.php
Size: 1,122 Bytes - Last Modified: 2021-12-23T10:31:28+00:00
/var/www/docs.ssmods.com/process/src/code/tagfield/TestTagFieldPage.php
1234567891011121314151617181920212223242526272829303132333435363738394041 | <?php // class TestTagFieldPage extends Page { // private static $db = array( // 'TestTagString' => 'Text', // 'FixedTags' => 'Text' // ); // private static $many_many = array( // 'TestTags' => 'TestTag', // ); // function getCMSFields() { // $fields = parent::getCMSFields(); // $tf1 = new TagField('TestTagString', "Single column tags (try 'one', 'two', 'three', 'four')", null, 'TestTagFieldPage'); // $fields->addFieldToTab('Root.Main', $tf1); // $tf2 = new TagField('TestTags', "Relation tags (try 'one', 'two', 'three', 'four')"); // $fields->addFieldToTab('Root.Main', $tf2); // $tf3 = new TagField('FixedTags', "Fixed tags (try 'PHP', 'Ruby', 'Python')", null, 'TestTag'); // $tf3->setCustomTags(array('PHP', 'Ruby', 'Python')); // $fields->addFieldToTab('Root.Main', $tf3); // return $fields; // } // function requireDefaultRecords(){ // $class = $this->class; // if(!DataObject::get_one($class)) { // $page = new $class(); // $page->Title = "Test TagField"; // $page->write(); // } // } // } // class TestTagFieldPage_Controller extends PageController {} |