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


PHP AbstractForm::__construct方法代码示例

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


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

示例1: __construct

 /**
  * Creates a new AllianceAdministrationForm object.
  */
 public function __construct()
 {
     if (!defined('DO_NOT_PARSE_ALLIANCE_TEXTS')) {
         define('DO_NOT_PARSE_ALLIANCE_TEXTS', true);
     }
     parent::__construct();
 }
开发者ID:sonicmaster,项目名称:RPG,代码行数:10,代码来源:AllianceAdministrationForm.class.php

示例2: __construct

 /**
  * Creates a new LoginForm object.
  */
 public function __construct()
 {
     if (WCF::getUser()->userID) {
         throw new PermissionDeniedException();
     }
     parent::__construct();
 }
开发者ID:CaribeSoy,项目名称:contest-wcf,代码行数:10,代码来源:LoginForm.class.php

示例3: __construct

 public function __construct(Smarty $smarty, Context $context, TranslatorInterface $translator, CustomerFormatter $formatter, CustomerPersister $customerPersister, array $urls)
 {
     parent::__construct($smarty, $translator, $formatter);
     $this->context = $context;
     $this->urls = $urls;
     $this->customerPersister = $customerPersister;
 }
开发者ID:M03G,项目名称:PrestaShop,代码行数:7,代码来源:CustomerForm.php

示例4: __construct

 /**
  * Constructor method to instantiate the form object
  *
  * @param  string         $action
  * @param  string         $method
  * @param  int            $tid
  * @param  boolean        $profile
  * @param  int            $uid
  * @param \Phire\Auth\Acl $acl
  * @param  boolean        $register
  * @return self
  */
 public function __construct($action = null, $method = 'post', $tid = 0, $profile = false, $uid = 0, $acl = null, $register = false)
 {
     parent::__construct($action, $method, null, '        ');
     // Create user type fields/form first
     if ($tid == 0) {
         $typesAry = array();
         $types = Table\UserTypes::findAll('id ASC');
         foreach ($types->rows as $type) {
             if ($acl->isAuth('Phire\\Controller\\Phire\\User\\IndexController', 'add_' . $type->id)) {
                 $typesAry[$type->id] = $type->type;
             }
         }
         $this->initFieldsValues = array('type_id' => array('type' => 'select', 'required' => true, 'label' => $this->i18n->__('Select User Type'), 'value' => $typesAry, 'attributes' => array('style' => 'margin: 0 10px 0 0; padding: 6px 5px 7px 5px; height: 32px;')), 'submit' => array('type' => 'submit', 'value' => $this->i18n->__('SELECT'), 'attributes' => array('class' => 'save-btn', 'style' => 'margin: 0; padding: 5px 6px 6px 6px; width: 100px; height: 32px;')));
         $id = 'user-select-form';
         // Else, create initial user fields
     } else {
         $this->initFieldsValues = $this->getInitFields($tid, $profile, $uid, $action, $register);
         if (strpos($action, '/install/user') !== false) {
             $id = 'user-install-form';
         } else {
             if ($profile) {
                 $id = 'user-install-form';
             } else {
                 $id = 'user-form';
             }
         }
     }
     $this->setAttributes('id', $id);
 }
开发者ID:akinyeleolubodun,项目名称:PhireCMS2,代码行数:41,代码来源:User.php

示例5: __construct

 /**
  * Constructor method to instantiate the form object
  *
  * @param  string $action
  * @param  string $method
  * @param  int    $sid
  * @return self
  */
 public function __construct($action = null, $method = 'post', $sid = 0)
 {
     parent::__construct($action, $method, null, '        ');
     $fieldGroups = array();
     $dynamicFields = false;
     $model = str_replace('Form', 'Model', get_class($this));
     $newFields = \Phire\Model\Field::getByModel($model, 0, $sid);
     if ($newFields['dynamic']) {
         $dynamicFields = true;
     }
     if ($newFields['hasFile']) {
         $this->hasFile = true;
     }
     foreach ($newFields as $key => $value) {
         if (is_numeric($key)) {
             $fieldGroups[] = $value;
         }
     }
     $fields1 = array('title' => array('type' => 'text', 'label' => $this->i18n->__('Title'), 'required' => true, 'attributes' => array('size' => 80)), 'domain' => array('type' => 'text', 'label' => $this->i18n->__('Domain'), 'required' => true, 'attributes' => array('size' => 80)), 'document_root' => array('type' => 'text', 'label' => $this->i18n->__('Document Root'), 'required' => true, 'attributes' => array('size' => 80)), 'base_path' => array('type' => 'text', 'label' => $this->i18n->__('Base Path'), 'attributes' => array('size' => 80)));
     if ($sid != 0) {
         $fields1['domain']['attributes']['onkeyup'] = "phire.updateTitle('#site-header-title', this);";
     }
     $fields2 = array('submit' => array('type' => 'submit', 'value' => $this->i18n->__('SAVE'), 'attributes' => array('class' => 'save-btn')), 'update' => array('type' => 'button', 'value' => $this->i18n->__('UPDATE'), 'attributes' => array('onclick' => "return phire.updateForm('#site-form', " . ($this->hasFile || $dynamicFields ? 'true' : 'false') . ");", 'class' => 'update-btn')), 'force_ssl' => array('type' => 'radio', 'label' => $this->i18n->__('Force SSL'), 'value' => array('0' => $this->i18n->__('No'), '1' => $this->i18n->__('Yes')), 'marked' => '0'), 'live' => array('type' => 'radio', 'label' => $this->i18n->__('Live'), 'value' => array('0' => $this->i18n->__('No'), '1' => $this->i18n->__('Yes')), 'marked' => '1'), 'id' => array('type' => 'hidden', 'value' => 0), 'update_value' => array('type' => 'hidden', 'value' => 0));
     $allFields = array($fields2);
     if (count($fieldGroups) > 0) {
         foreach ($fieldGroups as $fg) {
             $allFields[] = $fg;
         }
     }
     $allFields[] = $fields1;
     $this->initFieldsValues = $allFields;
     $this->setAttributes('id', 'site-form');
 }
开发者ID:akinyeleolubodun,项目名称:PhireCMS2,代码行数:41,代码来源:Site.php

示例6: __construct

 public function __construct()
 {
     parent::__construct();
     $this->compact = true;
     $this->labelWidth = 4;
     $this->controlWidth = 8;
     $this->addText('domain_name', 'Domain Name')->addText('domain_name_short', 'Short Domain Name')->addText('domain_controller', 'Domain Controller')->addText('ldap_port', 'LDAP Port Number')->addText('user', 'Username')->addPassword('password', 'Password')->addText('use_start_tls', 'Use Start TLS')->addText('baseDn', 'Base DN')->addButton('submit', 'Submit', 'btn-primary');
 }
开发者ID:srayner,项目名称:cobalt,代码行数:8,代码来源:AdConfigForm.php

示例7: __construct

 public function __construct()
 {
     parent::__construct();
     $this->add(array('name' => 'spec_id', 'attributes' => array('type' => 'hidden')));
     $this->add(array('name' => 'product_id', 'attributes' => array('type' => 'hidden')));
     $this->add(array('name' => 'label', 'options' => array('label' => 'Label')));
     $this->add(array('name' => 'value', 'options' => array('label' => 'Value')));
 }
开发者ID:pixlr,项目名称:SpeckCatalog,代码行数:8,代码来源:Spec.php

示例8: __construct

 public function __construct()
 {
     parent::__construct();
     $this->labelWidth = 3;
     $this->controlWidth = 9;
     $this->compact = true;
     $this->addText('name', 'Name')->addText('host', 'Hostname')->addText('port', 'Port')->addText('ssl', 'SSL')->addText('username', 'Username')->addPassword('password', 'Password')->addButton('submit', 'Submit', 'btn-primary');
 }
开发者ID:srayner,项目名称:cobalt,代码行数:8,代码来源:MailServerForm.php

示例9: __construct

 public function __construct()
 {
     parent::__construct();
     $this->add(array('name' => 'option_id', 'attributes' => array('type' => 'hidden')));
     $this->add(array('name' => 'choice_id', 'attributes' => array('type' => 'hidden')));
     $this->add(array('name' => 'product_id', 'attributes' => array('type' => 'hidden')));
     $this->add(array('name' => 'override_name', 'attributes' => array('type' => 'text'), 'options' => array('label' => 'Name')));
 }
开发者ID:pixlr,项目名称:SpeckCatalog,代码行数:8,代码来源:Choice.php

示例10: __construct

 /**
  * Constructor method to instantiate the form object
  *
  * @param  string $action
  * @param  string $method
  * @return self
  */
 public function __construct($action = null, $method = 'post')
 {
     parent::__construct($action, $method, null, '        ');
     $this->initFieldsValues = array('name' => array('type' => 'text', 'label' => $this->i18n->__('Name & Order'), 'required' => true, 'attributes' => array('size' => 40, 'style' => 'width: 376px;')), 'order' => array('type' => 'text', 'attributes' => array('size' => 3), 'value' => 0), 'dynamic' => array('type' => 'radio', 'label' => $this->i18n->__('Dynamic') . '?', 'value' => array('0' => $this->i18n->__('No'), '1' => $this->i18n->__('Yes')), 'marked' => '0'), 'id' => array('type' => 'hidden', 'value' => 0), 'update_value' => array('type' => 'hidden', 'value' => 0), 'submit' => array('type' => 'submit', 'label' => ' ', 'value' => $this->i18n->__('SAVE'), 'attributes' => array('class' => 'save-btn', 'style' => 'width: 190px;')), 'update' => array('type' => 'button', 'value' => $this->i18n->__('UPDATE'), 'attributes' => array('onclick' => "return phire.updateForm('#field-group-form', false);", 'class' => 'update-btn', 'style' => 'width: 190px;')));
     if (strpos($_SERVER['REQUEST_URI'], '/edit/') !== false) {
         $this->initFieldsValues['name']['attributes']['onkeyup'] = "phire.updateTitle('#field-group-title', this);";
     }
     $this->setAttributes('id', 'field-group-form');
 }
开发者ID:akinyeleolubodun,项目名称:PhireCMS2,代码行数:16,代码来源:FieldGroup.php

示例11: __construct

 public function __construct(Smarty $smarty, Context $context, TranslatorInterface $translator, CustomerLoginFormatter $formatter, array $urls)
 {
     parent::__construct($smarty, $translator, $formatter);
     $this->context = $context;
     $this->translator = $translator;
     $this->formatter = $formatter;
     $this->urls = $urls;
     $this->constraintTranslator = new ValidateConstraintTranslator($this->translator);
 }
开发者ID:M03G,项目名称:PrestaShop,代码行数:9,代码来源:CustomerLoginForm.php

示例12: __construct

 public function __construct()
 {
     parent::__construct();
     $this->add(array('name' => 'product_id', 'attributes' => array('type' => 'hidden')));
     $this->add(array('name' => 'quantity', 'attributes' => array('type' => 'text', 'class' => 'span1'), 'options' => array('label' => 'Quantity')));
     $this->add(array('name' => 'price', 'attributes' => array('type' => 'text', 'class' => 'span1'), 'options' => array('label' => 'Price')));
     $this->add(array('name' => 'retail', 'attributes' => array('type' => 'text', 'class' => 'span1'), 'options' => array('label' => 'Retail')));
     $this->add(array('name' => 'enabled', 'type' => 'Zend\\Form\\Element\\Select', 'attributes' => array('type' => 'select', 'options' => array(1 => 'Yes', 0 => 'No')), 'options' => array('label' => 'Enabled')));
 }
开发者ID:nclundsten,项目名称:SpeckCatalog,代码行数:9,代码来源:ProductUom.php

示例13: __construct

 public function __construct()
 {
     parent::__construct();
     $this->add(array('name' => 'product_id', 'attributes' => array('type' => 'hidden')));
     $this->add(array('name' => 'name', 'attributes' => array('type' => 'text'), 'options' => array('label' => 'Name')));
     $this->add(array('name' => 'description', 'attributes' => array('type' => 'textarea'), 'options' => array('label' => 'Description')));
     $this->add(array('name' => 'item_number', 'attributes' => array('type' => 'text'), 'options' => array('label' => 'Item Number')));
     $this->add(array('name' => 'product_type_id', 'type' => 'Zend\\Form\\Element\\Select', 'attributes' => array('type' => 'select', 'options' => array('1' => 'Shell', '2' => 'Product')), 'options' => array('label' => 'Product Type')));
 }
开发者ID:pixlr,项目名称:SpeckCatalog,代码行数:9,代码来源:Product.php

示例14: __construct

 public function __construct()
 {
     parent::__construct();
     $this->add(array('name' => 'uom_code', 'attributes' => array('type' => 'hidden')));
     $this->add(array('name' => 'product_id', 'attributes' => array('type' => 'hidden')));
     $this->add(array('name' => 'quantity', 'attributes' => array('type' => 'hidden')));
     $this->add(array('name' => 'distributor_item_number', 'attributes' => array('type' => 'text', 'class' => 'span1'), 'options' => array('label' => 'Dist Item#')));
     $this->add(array('name' => 'distributor_uom_code', 'attributes' => array('type' => 'text'), 'options' => array('label' => 'Dist UOM')));
     $this->add(array('name' => 'cost', 'attributes' => array('type' => 'text'), 'options' => array('label' => 'Cost')));
 }
开发者ID:pixlr,项目名称:SpeckCatalog,代码行数:10,代码来源:Availability.php

示例15: __construct

 public function __construct()
 {
     parent::__construct();
     $this->add(array('name' => 'option_id', 'attributes' => array('type' => 'hidden')));
     $this->add(array('name' => 'choice_id', 'attributes' => array('type' => 'hidden')));
     $this->add(array('name' => 'product_id', 'attributes' => array('type' => 'hidden')));
     $this->add(array('name' => 'name', 'attributes' => array('type' => 'text'), 'options' => array('label' => 'Option Group Name (size, color, etc.)')));
     $this->add(array('name' => 'instruction', 'attributes' => array('type' => 'text'), 'options' => array('label' => 'Instruction')));
     $this->add(array('name' => 'required', 'attributes' => array('type' => 'text'), 'options' => array('label' => 'Required')));
     $this->add(array('name' => 'builder', 'type' => 'Zend\\Form\\Element\\Select', 'attributes' => array('options' => array('0' => 'False', '1' => 'True')), 'options' => array('label' => 'Builder')));
     $this->add(array('name' => 'option_type_id', 'type' => 'Zend\\Form\\Element\\Select', 'attributes' => array('options' => array('' => '---------', '1' => 'Select Box', '2' => 'Radio Buttons', '3' => 'Checkboxes')), 'options' => array('label' => 'Display Options As')));
 }
开发者ID:pixlr,项目名称:SpeckCatalog,代码行数:12,代码来源:Option.php


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