Source of file EditableFieldCheckbox.php
Size: 0,985 Bytes - Last Modified: 2021-12-23T10:19:50+00:00
/var/www/docs.ssmods.com/process/src/code/models/editablefields/EditableFieldCheckbox.php
1234567891011121314151617181920212223242526272829303132333435363738394041 | <?php /** * Moo_EditableFieldCheckbox is an object representing a checkbox created by CMS admin. * * @package editablefield * * @author Mohamed Alsharaf <mohamed.alsharaf@gmail.com> */ class Moo_EditableFieldCheckbox extends Moo_EditableField { private static $singular_name = 'Checkbox Field'; private static $plural_name = 'Checkboxes'; /** * List of allowed custom settings fields. * * @var array */ protected $customSettingsFields = [ 'Default', ]; /** * Get extra configuration fields. * * @return array */ public function getFieldConfiguration() { return [ new CheckboxField($this->getSettingName('Default'), _t('Moo_EditableField.CHECKEDBYDEFAULT', 'Checked by Default?'), $this->getSetting('Default')), ]; } protected function initFormField() { return new CheckboxField($this->Name, $this->Title, $this->getSetting('Default')); } } |