當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Zend_Form_Element_Xhtml類代碼示例

本文整理匯總了PHP中Zend_Form_Element_Xhtml的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_Form_Element_Xhtml類的具體用法?PHP Zend_Form_Element_Xhtml怎麽用?PHP Zend_Form_Element_Xhtml使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了Zend_Form_Element_Xhtml類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: loadDefaultDecorators

 public function loadDefaultDecorators()
 {
     parent::loadDefaultDecorators();
     $this->removeDecorator('Label');
     $this->removeDecorator('HtmlTag');
     $this->addDecorator('HtmlTag', array('tag' => 'span', 'class' => 'spanImg'));
 }
開發者ID:redaumore,項目名稱:promociones,代碼行數:7,代碼來源:Img.php

示例2: __construct

 public function __construct($spec, $options = array())
 {
     $options = array_merge($options, array('disableLoadDefaultDecorators' => true));
     parent::__construct($spec, $options);
     $this->_decorator = new Monkeys_Form_Decorator_Composite();
     $this->addDecorator($this->_decorator);
 }
開發者ID:sdgdsffdsfff,項目名稱:auth-center,代碼行數:7,代碼來源:Richtextarea.php

示例3: __construct

 /**
  * constructor
  * @param $spec
  * @param $options
  */
 public function __construct($spec, $options = null)
 {
     $objLoader = new PluginLoader();
     $objLoader->setPluginLoader($this->getPluginLoader(PluginLoader::TYPE_FORM_DECORATOR));
     $objLoader->setPluginType(PluginLoader::TYPE_FORM_DECORATOR);
     $this->setPluginLoader($objLoader, PluginLoader::TYPE_FORM_DECORATOR);
     parent::__construct($spec, $options);
 }
開發者ID:BGCX261,項目名稱:zoolu-svn-to-git,代碼行數:13,代碼來源:form.element.xhtml.abstract.class.php

示例4: isValid

 /**
  * Override isValid()
  *
  * Ensure that validation error messages mask password value.
  * 
  * @param  string $value 
  * @param  mixed $context 
  * @return bool
  */
 public function isValid($value, $context = null)
 {
     foreach ($this->getValidators() as $validator) {
         if ($validator instanceof Zend_Validate_Abstract) {
             $validator->setObscureValue(true);
         }
     }
     return parent::isValid($value, $context);
 }
開發者ID:VUW-SIM-FIS,項目名稱:emiemi,代碼行數:18,代碼來源:Password.php

示例5: __construct

 public function __construct($spec, $options = null)
 {
     $localOptions = array('filters' => array('StringTrim'), 'label' => 'Date and time', 'validators' => array(new \Tillikum\Validate\FormDatetime()));
     if (isset($options)) {
         $options = array_replace_recursive($localOptions, $options);
     } else {
         $options = $localOptions;
     }
     parent::__construct($spec, $options);
 }
開發者ID:tillikum,項目名稱:tillikum-core-module,代碼行數:10,代碼來源:Datetime.php

示例6: __construct

 public function __construct($spec, $options = null)
 {
     if (is_string($spec) && (null !== $options && is_string($options))) {
         $options = array('label' => $options);
     }
     if (!isset($options['ignore'])) {
         $options['ignore'] = true;
     }
     parent::__construct($spec, $options);
 }
開發者ID:knatorski,項目名稱:SMS,代碼行數:10,代碼來源:Note.php

示例7: __construct

 public function __construct($spec, $options = null)
 {
     $localOptions = array('filters' => array('StringTrim'));
     if (isset($options)) {
         $options = array_replace_recursive($localOptions, $options);
     } else {
         $options = $localOptions;
     }
     parent::__construct($spec, $options);
 }
開發者ID:tillikum,項目名稱:tillikum-core-module,代碼行數:10,代碼來源:Search.php

示例8: getLabel

 /**
  * Return label
  *
  * If no label is present, returns the currently set name.
  *
  * If a translator is present, returns the translated label.
  *
  * @return string
  */
 public function getLabel()
 {
     $value = parent::getLabel();
     if (null === $value) {
         $value = $this->getName();
     }
     if (null !== ($translator = $this->getTranslator())) {
         return $translator->translate($value);
     }
     return $value;
 }
開發者ID:jpbender,項目名稱:mage_virtual,代碼行數:20,代碼來源:Submit.php

示例9: getValue

 public function getValue()
 {
     if (is_array($this->_value)) {
         $value = $this->_value['year'] . '-' . $this->_value['month'] . '-' . $this->_value['day'];
         if ($value == '--') {
             $value = null;
         }
         $this->setValue($value);
     }
     return parent::getValue();
 }
開發者ID:ncsuwebdev,項目名稱:otframework,代碼行數:11,代碼來源:Date.php

示例10: __construct

 /**
  * Определяем массив ролей и уровней доступа и дергаем родительский конструктор
  *
  * @param unknown_type $spec
  * @param unknown_type $options
  */
 public function __construct($spec, $options = null)
 {
     /**
      * @see Phorm_User
      */
     require_once "Phorm/User.php";
     $User = new Phorm_User();
     $options['roles'] = $User->getRolesListAsPairs();
     $options['levels'] = $User->getAccessLevelsAsPairs();
     parent::__construct($spec, $options);
 }
開發者ID:ei-grad,項目名稱:phorm,代碼行數:17,代碼來源:AclMultiSelect.php

示例11: isRequired

 public function isRequired()
 {
     $elements = $this->getElements();
     if (empty($elements)) {
         return parent::isRequired();
     }
     foreach ($elements as $el) {
         if ($el->isRequired()) {
             return true;
         }
     }
     return false;
 }
開發者ID:crlang44,項目名稱:frapi,代碼行數:13,代碼來源:Group.php

示例12: __call

 /**
  * Overloading: allow rendering specific decorators
  *
  * Call renderDecoratorName() to render a specific decorator.
  *
  * @param  string $method
  * @param  array $args
  * @return \MUtil_Html_HtmlElement or at least something that implements the \MUtil_Html_HtmlInterface interface
  * @throws \Zend_Form_Exception for invalid decorator or invalid method call
  */
 public function __call($method, $args)
 {
     if ('render' == substr($method, 0, 6)) {
         return parent::__call($method, $args);
     }
     $elem = \MUtil_Html::createArray($method, $args);
     $value = $this->getValue();
     if (!$value instanceof \MUtil_Html_ElementInterface) {
         $value = new \MUtil_Html_Sequence();
     }
     $value->append($elem);
     $this->setValue($value);
     return $elem;
 }
開發者ID:GemsTracker,項目名稱:MUtil,代碼行數:24,代碼來源:Html.php

示例13: isValid

 public function isValid($value, $context = null)
 {
     if (!is_array($value)) {
         return false;
     }
     $result = checkdate((int) $value['month'], (int) $value['day'], (int) $value['year']);
     if ($result == false) {
         $value = null;
     }
     if ($this->max_year && (int) $value['year'] > $this->max_year || $this->min_year && (int) $value['year'] < $this->min_year) {
         $value = null;
     }
     return parent::isValid($value, $context);
 }
開發者ID:georgepaul,項目名稱:songslikesocial,代碼行數:14,代碼來源:Date.php

示例14: isValid

 /**
  * Validate upload
  * 
  * @param  string $value 
  * @param  mixed $context 
  * @return bool
  */
 public function isValid($value, $context = null)
 {
     if (isset($_FILES[$this->getName()])) {
         $value = $_FILES[$this->getName()]['tmp_name'];
         $context = $_FILES[$this->getName()];
         $context['destination'] = $this->_destination;
     }
     $isValid = parent::isValid($value, $context);
     // If it's valid, we move the file to its final destination
     if ($isValid && isset($this->_destination)) {
         $destination = is_dir($this->_destination) ? $this->_destination . '/' . $context['name'] : $this->_destination;
         move_uploaded_file($value, $destination);
     }
     return $isValid;
 }
開發者ID:Tony133,項目名稱:zf-web,代碼行數:22,代碼來源:File.php

示例15: setValue

 public function setValue($value)
 {
     if (is_array($value)) {
         if (isset($value['value'])) {
             parent::setValue($value['value']);
         }
         if (isset($value['overwrite'])) {
             if ($value['overwrite'] == '1' || $value['overwrite'] === true) {
                 $this->overwrite = true;
             } else {
                 $this->overwrite = false;
             }
         }
     } else {
         parent::setValue($value);
     }
 }
開發者ID:hausdesign,項目名稱:zf-library,代碼行數:17,代碼來源:TextareaOverwrite.php


注:本文中的Zend_Form_Element_Xhtml類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。