public function __construct($reference = null, $fieldname = null) { if (is_object($reference)) { $model = $reference; } else { if (class_exists($reference) && is_instance_of($reference, 'Zend_Db_Table_Abstract')) { $model = new $reference(); } else { $this->setReferenceName($reference); } } if (!$fieldname) { $fieldname = is_object($reference) ? get_class($reference) : $reference; } parent::__construct($fieldname); if (isset($model)) { if (!$model instanceof Kwf_Model_Interface) { $model = new Kwf_Model_Db(array('table' => $model)); } $this->setModel($model); } $this->fields = new Kwf_Collection_FormFields(); $this->setBorder(false); $this->setBaseCls('x2-plain'); $this->setXtype('multifields'); $this->setMinEntries(1); }
public function __construct($tableName = null, $title = null) { parent::__construct(); if (is_object($tableName)) { $model = $tableName; } else { if (class_exists($tableName)) { $model = new $tableName(); } else { throw new Kwf_Exception("'{$tableName}' does not exist"); } } parent::__construct(get_class($model)); if ($model instanceof Zend_Db_Table_Abstract) { $model = new Kwf_Model_Db(array('table' => $model)); } $this->setModel($model); if ($title) { $this->setTitle($title); } $this->setHideLabels(true); $this->setAutoHeight(true); $this->setLayout('form'); $this->setXtype('fieldset'); }
/** * Zeigt mehrere Checkboxes an und speichert diese in einer Relationstabelle * * @param string|Kwf_Model_Abstract $dependetModelRule Kann folgendes sein: * - Die rule vom Datenmodel zur Relationstabelle (string) * - oder das RelationsModel selbst (Kwf_Model_Abstract) * @param string $relationToValuesRule Die rule vom Relationsmodel zum Values-model */ public function __construct($dependetModelRule, $relationToValuesRule, $title = null, $fieldKey = null) { if (!is_string($dependetModelRule)) { if (is_object($dependetModelRule) && !$dependetModelRule instanceof Kwf_Model_Abstract) { throw new Kwf_Exception("dependetModelRule must be of type string (Rule) or Kwf_Model_Abstract (RelationModel)"); } } $this->setRelModel($dependetModelRule); $this->setValuesModel($relationToValuesRule); $this->_relationToValuesRule = $relationToValuesRule; if (!$fieldKey) { $fieldKey = $relationToValuesRule; } parent::__construct($fieldKey); if ($title) { $this->setTitle($title); $this->setFieldLabel($title); } $this->setAutoHeight(true); $this->setShowCheckAllLinks(true); $this->setCheckAllText(trlKwfStatic('All')); $this->setCheckNoneText(trlKwfStatic('None')); $this->setLayout('form'); $this->setXtype('multicheckbox'); $this->setEmptyMessage(trlKwfStatic('Please choose an option')); $this->setOutputType('horizontal'); }
public function __construct($fieldName = null, $fieldLabel = null) { $this->_passwordField1 = new Kwf_Form_Field_Password($fieldName, $fieldLabel); $this->_passwordField1->setAllowBlank(false); $this->_passwordField2 = new Kwf_Form_Field_Password($fieldName . '_repeat', trlKwfStatic('Repeat {0}')); $this->_passwordField2->setSave(false); parent::__construct(null, null); }
public function __construct($name = null) { parent::__construct($name); if (!isset($this->fields)) { $this->fields = new Kwf_Collection_FormFields(); } $this->setLayout('form'); $this->setBorder(false); $this->setLabelAlign('right'); $this->setBaseCls('x2-plain'); }
public function __construct($name = null, $fieldLabel = null) { parent::__construct($name, $fieldLabel); $this->setXtype('kwf.form.field.image.dimensionfield'); }
public function __construct($field_name = null, $field_label = null, $ruleKey = null) { parent::__construct($field_name, $field_label); $this->setXtype('imageviewer'); $this->setRuleKey($ruleKey); }
public function __construct() { parent::__construct(); $this->setXtype('filterfield'); $this->setFilterParam('filter'); }
public function __construct($fieldName = null, $fieldLabel = null) { parent::__construct($fieldName, $fieldLabel); $this->setAllowTags(false); }
public function __construct($text, $fieldLabel = null) { parent::__construct(null, $fieldLabel); $this->setXtype('staticfield'); $this->setText($text); }