当前位置: 首页>>代码示例>>PHP>>正文


PHP Zend_Form_Element_Xhtml::__construct方法代码示例

本文整理汇总了PHP中Zend_Form_Element_Xhtml::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Form_Element_Xhtml::__construct方法的具体用法?PHP Zend_Form_Element_Xhtml::__construct怎么用?PHP Zend_Form_Element_Xhtml::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zend_Form_Element_Xhtml的用法示例。


在下文中一共展示了Zend_Form_Element_Xhtml::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __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,代码来源:DateTime.php

示例2: __construct

 /**
  * Constructor
  * 
  * @param  string|array|Zend_Config $spec Element name or configuration
  * @param  string|array|Zend_Config $options Element value or configuration
  * @return void
  */
 public function __construct($spec, $options = null)
 {
     if (is_string($spec) && (null !== $options && is_string($options))) {
         $options = array('label' => $options);
     }
     parent::__construct($spec, $options);
 }
开发者ID:bitExpert,项目名称:Tine-2.0-Open-Source-Groupware-and-CRM,代码行数:14,代码来源:Submit.php

示例3: __construct

    /**
     * Constructor
     *
     * Creates session namespace for CSRF token, and adds validator for CSRF
     * token.
     *
     * @param  string|array|Zend_Config $spec
     * @param  array|Zend_Config $options
     * @return void
     */
    public function __construct($spec, $options = null)
    {
        parent::__construct($spec, $options);

        $this->setAllowEmpty(false)
             ->setRequired(true)
             ->initCsrfValidator();
    }
开发者ID:nhp,项目名称:shopware-4,代码行数:18,代码来源:Hash.php

示例4: __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

示例5: __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

示例6: __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

示例7: __construct

 /**
  * Constructor
  *
  * @param  string|array|Zend_Config $spec Element name or configuration
  * @param  string|array|Zend_Config $options Element value or configuration
  * @return void
  */
 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:jpbender,项目名称:mage_virtual,代码行数:17,代码来源:Submit.php

示例8: __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

示例9: __construct

 /**
  * Определяем массив опций и дергаем родительский конструктор
  *
  * @param mixed $spec
  * @param array $options
  */
 public function __construct($spec, $options = null)
 {
     $this->translate = Zend_Controller_Front::getInstance()->getParam('bootstrap')->getResource('Translate');
     /**
      * Выделяем дополнительные элементы в отдельную форму и рендерим ее
      */
     require_once 'Phorm/Form.php';
     if (isset($options['elements']) && is_array($options['elements'])) {
         $config = array('elements' => $options['elements']);
         if (isset($options['paths']['prefixPath'])) {
             $config['prefixPath'] = array_values($options['paths']['prefixPath']);
         }
         if (isset($options['paths']['elementPrefixPath'])) {
             $config['elementPrefixPath'] = array_values($options['paths']['elementPrefixPath']);
         }
         /*foreach ($options as $key=>$option) {
         			if(!in_array($key,array('elements','prefixPath','elementPrefixPath'))) {
         				unset($options[$key]);
         			}
         		}*/
         $form = new Phorm_Form(null, null, $config);
         $form->removeDecorator('Form');
         $form->removeDecorator('DtDdWrapper');
         $form->setElementsBelongTo($spec . '[]');
         $this->renderform = $form->render() . '<div class="clear"></div>';
         unset($options['elements'], $config['elements']);
         foreach ($form->getElements() as $element) {
             $element->setAttrib('id', null);
         }
         $this->form = $form;
     }
     /**
      * Инициализируем родительский конструктор
      */
     parent::__construct($spec, $options);
 }
开发者ID:ei-grad,项目名称:phorm,代码行数:42,代码来源:MultiElement.php

示例10: __construct

 /**
  * Constructor
  *
  * $spec may be:
  * - string: name of element
  * - array: options with which to configure element
  * - Zend_Config: Zend_Config with options for configuring element
  *
  *
  * Chosen options can be set in array two ways first by DQL second simple array.
  *
  * To set options by DQL $options array structure should be like:
  *  [
  *      'dql' => "select u.username from \\Entities\\User where u.username IS NOT NULL", //mandatory
  *      'db'  => "default" //Optional if db is not default. Some project may have more then one.
  *  ]
  * 
  * To set options by array $options array structure should be like:
  *  [
  *      'options' => [ 'option1' => 'option1', 'option2' => 'option2', 'option3' => 'option3' ], //mandatory
  *  ]
  *
  *
  * @param  string|array|Zend_Config $spec
  * @return void
  *
  * @see setChosenOptions()
  * @see setChosenOptionsByDql()
  */
 public function __construct($spec, $options = null)
 {
     if (isset($options['options'])) {
         $this->setChosenOptions($options['options']);
         unset($options['options']);
     } else {
         if (isset($options['dql'])) {
             if (isset($options['db'])) {
                 $this->setChosenOptionsByDql($options['dql'], $options['db']);
                 unset($options['db']);
             } else {
                 $this->setChosenOptionsByDql($options['dql']);
             }
             unset($options['dql']);
         }
     }
     parent::__construct($spec, $options);
 }
开发者ID:opensolutions,项目名称:oss-framework,代码行数:47,代码来源:DatabaseDropdown.php

示例11: __construct

 public function __construct($spec, $options = null)
 {
     parent::__construct($spec, $options);
 }
开发者ID:AlexanderMazaletskiy,项目名称:gym-Tracker-App,代码行数:4,代码来源:Date.php

示例12: __construct

 /**
  * Constructor
  *
  * @param string $spec
  * @param array $options
  * @return void
  */
 public function __construct($spec, $options = null)
 {
     $this->addPrefixPath('Rexmac\\Zyndax\\Form\\Decorator\\', 'Rexmac/Zyndax/Form/Decorator', 'decorator');
     parent::__construct($spec, $options);
 }
开发者ID:rexmac,项目名称:zyndax,代码行数:12,代码来源:SocialNetworkIdentity.php

示例13: __construct

 /**
  * Constructor
  *
  * $spec may be:
  * - string: name of element
  * - array: options with which to configure element
  * - \Zend_Config: \Zend_Config with options for configuring element
  *
  * @param \Zend_Form $subForm
  * @param  string|array|\Zend_Config $spec
  * @throws \Zend_Form_Exception if no element name after initialization
  */
 public function __construct(\Zend_Form $subForm, $spec, $options = null)
 {
     $this->setSubForm($subForm);
     parent::__construct($spec, $options);
 }
开发者ID:GemsTracker,项目名称:MUtil,代码行数:17,代码来源:Table.php

示例14: __construct

 /**
  * Constructor
  *
  * @param string $spec
  * @param array $options
  * @return void
  */
 public function __construct($spec, $options = null)
 {
     $this->addPrefixPath('Rexmac\\Zyndax\\Form\\Decorator\\', 'Rexmac/Zyndax/Form/Decorator', 'decorator');
     $this->setTimeZone(isset($options['timeZone']) ? $options['timeZone'] : new DateTimeZone('UTC'));
     $this->setRangedDates(self::_calculateRangedDates($this->getTimeZone()));
     $this->setRange(self::TODAY);
     parent::__construct($spec, $options);
 }
开发者ID:rexmac,项目名称:zyndax,代码行数:15,代码来源:DateRange.php

示例15: __construct

 /**
  * Инициализируем переводчик и дергаем родительский конструктор
  *
  * @param mixed $spec
  * @param array $options
  */
 public function __construct($spec, $options = null)
 {
     $this->translate = Zend_Controller_Front::getInstance()->getParam('bootstrap')->getResource('Translate');
     parent::__construct($spec, $options);
 }
开发者ID:ei-grad,项目名称:phorm,代码行数:11,代码来源:MediaFile.php


注:本文中的Zend_Form_Element_Xhtml::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。