當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。