当前位置: 首页>>代码示例>>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;未经允许,请勿转载。