Source of file GallerySection.php
Size: 0,965 Bytes - Last Modified: 2021-12-23T10:10:42+00:00
/var/www/docs.ssmods.com/process/src/code/sections/GallerySection.php
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 | <?php /** * * * @package silverstripe * @subpackage sections */ class GallerySection extends Section { private static $title = "Gallery"; private static $description = ""; /** * Many_many relationship * @var array */ private static $many_many = array( 'Images' => 'Image' ); /** * {@inheritdoc } * @var array */ private static $many_many_extraFields = array( 'Images' => array( 'SortOrder' => 'Int' ) ); /** * CMS Fields * @return array */ public function getCMSFields() { $fields = parent::getCMSFields(); $fields->addFieldsToTab( "Root.Main", array( SortableUploadField::create( 'Images', 'Current Image(s)' ) ) ); $this->extend('updateCMSFields', $fields); return $fields; } } |