/** * Create a new nullable field * @param $valueField * @return NullableField */ function __construct(FormField $valueField, $isNullLabel = null) { $this->valueField = $valueField; $this->isNullLabel = $isNullLabel; if (is_null($this->isNullLabel)) { // Set a default label if one is not provided. $this->isNullLabel = _t('NullableField.IsNullLabel', 'Is Null', PR_HIGH); } parent::__construct($valueField->Name(), $valueField->Title(), $valueField->Value(), $valueField->getForm(), $valueField->RightTitle()); $this->readonly = $valueField->isReadonly(); }
/** * @param FormField $child */ public function __construct($child) { parent::__construct($child->Name()); $this->child = $child; $this->checkbox = new CheckboxField("Visible[{$this->name}]", ''); }