/**
  * @return string
  */
 protected function renderAttributeIndexOrDerivedType()
 {
     $hiddenInputName = Element::resolveInputNamePrefixIntoString(array_merge($this->inputPrefixData, array('attributeIndexOrDerivedType')));
     $hiddenInputId = Element::resolveInputIdPrefixIntoString(array_merge($this->inputPrefixData, array('attributeIndexOrDerivedType')));
     $idInputHtmlOptions = array('id' => $hiddenInputId);
     return ZurmoHtml::hiddenField($hiddenInputName, $this->model->getAttributeIndexOrDerivedType(), $idInputHtmlOptions);
 }
コード例 #2
0
ファイル: ReportSelectForm.php プロジェクト: youprofit/Zurmo
 /**
  * Override to handle use case of $name == 'id'.
  * As this form does not have an 'id', it will return null;
  * @see ModelElement.  This form is used by ModelElement for example
  * and ModelElement expects the model to have an 'id' value.
  */
 public function __get($name)
 {
     if ($name == 'id') {
         return null;
     }
     return parent::__get($name);
 }
コード例 #3
0
 /**
  * Special override to handle setting attributeIndexOrDerivedType
  * @param string $name
  * @param mixed $value
  * @return mixed|void
  */
 public function __set($name, $value)
 {
     if ($name == 'attributeIndexOrDerivedType') {
         $this->_attributeIndexOrDerivedType = $value;
         $this->resolveAttributeOrRelationAndAttributeDataByIndexType($value);
     } else {
         parent::__set($name, $value);
     }
 }
コード例 #4
0
 /**
  * Override to properly handle retrieving rule information from the model for the attribute name.
  */
 public function rules()
 {
     return array_merge(parent::rules(), array(array('type', 'type', 'type' => 'string'), array('type', 'required'), array('audienceType', 'safe'), array('audienceType', 'required')));
 }
コード例 #5
0
 /**
  * @return bool
  */
 public function beforeValidate()
 {
     if (!$this->validateAttributes()) {
         return false;
     }
     return parent::beforeValidate();
 }
コード例 #6
0
 /**
  * @return bool
  */
 public function beforeValidate()
 {
     if (!$this->validateRecipients()) {
         return false;
     }
     return parent::beforeValidate();
 }
コード例 #7
0
 public function rules()
 {
     return array_merge(parent::rules(), array(array('type', 'type', 'type' => 'string'), array('firstSeries', 'type', 'type' => 'string'), array('firstRange', 'type', 'type' => 'string'), array('secondSeries', 'type', 'type' => 'string'), array('secondRange', 'type', 'type' => 'string'), array('type', 'validateSeriesAndRange')));
 }
コード例 #8
0
 /**
  * Override to properly handle retrieving rule information from the model for the attribute name.
  */
 public function rules()
 {
     $rules = array_merge(parent::rules(), array(array('type', 'type', 'type' => 'string'), array('type', 'required'), array('value', 'safe'), array('value', 'validateValue'), array('shouldSetValue', 'boolean')));
     $applicableRules = ModelAttributeRulesToWorkflowActionAttributeUtil::getApplicableRulesByModelClassNameAndAttributeName($this->modelClassName, $this->modelAttributeName, 'value');
     return array_merge($rules, $applicableRules);
 }