public function getCMSFields() { $this->beforeUpdateCMSFields(function ($fields) { $uploadField = UploadField::create('Image', 'Image')->setAllowedFileCategories('image')->setAllowedMaxFileNumber(1)->setFolderName('Uploads/images'); $fields->addFieldToTab('Root.Main', $uploadField); $caption = HTMLEditorField::create('Caption', 'Caption'); $caption->setRightTitle('Optional'); $fields->addFieldToTab('Root.Main', $caption); }); return parent::getCMSFields(); }
public function __construct($label, array $sources, $flags = null, $searchOp = null) { parent::__construct($label, $sources, 'showUpdate', array(), $flags, null, $searchOp); }
function cssSelector($append = '', $nestingLevel = null) { return parent::cssSelector(($this->parent->quickDelete ? '.ajax' : '.lightbox') . $append, $nestingLevel); }
public function val($sources = null) { $this->parent->clearId(); $link = parent::val($sources); return $link; }