示例#1
0
文件: WHidden.php 项目: point/cassea
 /**
  * Method description
  *
  * More detailed method description
  * @param    void
  * @return   void
  */
 function buildComplete()
 {
     if (!isset($this->tpl)) {
         $this->tpl = $this->createTemplate();
     }
     parent::buildComplete();
 }
示例#2
0
 function postRender()
 {
     $this->childPostRender();
     parent::postRender();
 }
示例#3
0
文件: WButton.php 项目: point/cassea
 /**
  * Method description
  *
  * More detailed method description
  * @param    mixed $data
  * @return   void
  */
 function setData(WidgetResultSet $data)
 {
     $this->setSrc($data->get('src'));
     $this->setAlt($data->get('alt'));
     $this->setType($data->get('type'));
     parent::setData($data);
 }
示例#4
0
 /**
  * Method description
  *
  * More detailed method description
  * @param    void
  * @return   void
  */
 function assignVars()
 {
     $this->tpl->setParamsArray(array("cols" => $this->getCols(), "rows" => $this->getRows()));
     parent::assignVars();
 }
示例#5
0
文件: WRadio.php 项目: point/cassea
 /**
  * Method description
  *
  * More detailed method description
  * @param    mixed $data
  * @return   void
  */
 function setData(WidgetResultSet $data)
 {
     $this->setChecked($data->get('checked'));
     $this->setText($data->get('text'));
     parent::setData($data);
 }
示例#6
0
文件: WFile.php 项目: point/cassea
 /**
  * Method description
  *
  * More detailed method description
  * @param    void
  * @return   void
  */
 function assignVars()
 {
     $this->tpl->setParamsArray(array("size" => $this->getSize(), 'max_file_size' => $this->getMaxFileSize()));
     parent::assignVars();
 }
示例#7
0
文件: WEdit.php 项目: point/cassea
 /**
  * Method description
  *
  * More detailed method description
  * @param    void
  * @return   void
  */
 function assignVars()
 {
     $this->tpl->setParamsArray(array("default" => $this->getDefault(), "type" => $this->getType(), "maxlength" => $this->getMaxLength(), "size" => $this->getSize(), "key_title" => Language::message("widgets", "edit_key_title")));
     parent::assignVars();
 }
示例#8
0
 /**
  * Set checker rules for html control with specified name.
  * Used by POSTChecker and should be placed in storage. It will be 
  * restored during POST request. 
  * Primarily for internal use by WValueChecker class.
  *
  * @param string complete form signature, that will come via POST
  * @param WControl object of HTML control, which should be checked upon the rules. WControl because
  * widget should have getName() method.
  * @param string name of the rule to apply ("required", "min", "max" etc)
  * @param string value for rule. May be empty if rule doesn't need value (such as required).
  * @param string optional message to be displayed, if default doesn't feet for particular needs.
  */
 function setChecker($form_sig, WControl $widget, $rule, $rule_value, $message = null)
 {
     if (!isset($form_sig, $widget, $rule, $rule_value)) {
         return;
     }
     if ($widget instanceof iFileUploader) {
         $this->file_rules[$form_sig][$widget->getName()][$rule] = trim($rule_value);
     } else {
         $this->checker_rules[$form_sig][$widget->getName()][$rule] = trim($rule_value);
     }
     if (!is_null($message)) {
         $this->checker_messages[$form_sig][$widget->getName()] = $message;
     }
 }