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


PHP Zend_Form::getDisplayGroup方法代码示例

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


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

示例1: indexAction

 function indexAction()
 {
     $form = new Zend_Form();
     $form->setAction($_SERVER['REQUEST_URI'])->setMethod('post')->setAttrib("id", "formPublish");
     $jobs_per_categ = $form->createElement('text', 'jobs_per_categ')->setLabel('Job title:')->addFilter('StripTags')->addFilter('StringTrim')->addFilter('HtmlEntities')->addValidator('notEmpty')->setDescription('Ex: "Flash Designer" or "ASP.NET Programmer"')->setRequired(true);
     $submit = $form->createElement('submit', 'submit')->setLabel("Set");
     $config = Zend_Registry::get("conf");
     foreach ($this->textItems as $category => $items) {
         foreach ($items as $key => $label) {
             $item = $form->createElement('text', $key)->setLabel($label)->addValidator('notEmpty')->setRequired(true)->setValue($config->{$category}->{$key});
             $form->addElement($item);
         }
         $form->addDisplayGroup(array_keys($items), $category, array('legend' => ucfirst($category)));
     }
     foreach ($this->checkItems as $category => $items) {
         foreach ($items as $key => $label) {
             $item = $form->createElement('checkbox', $key)->setLabel($label)->setChecked($config->{$category}->{$key});
         }
         $form->getDisplayGroup($category)->addElement($item);
     }
     // Locale select
     $locales = Zend_Registry::get("Zend_Locale")->getTranslationList('language', 'en');
     foreach ($locales as $key => $value) {
         if (!file_exists("Joobsbox/Languages/{$key}")) {
             unset($locales[$key]);
         }
     }
     $locale = $form->createElement('select', 'locale')->setMultiOptions($locales)->setLabel($this->view->translate("Language"))->setValue($config->general->locale);
     $form->getDisplayGroup('general')->addElement($locale);
     // Timezone select
     $tzfile = file("config/timezones.ini.php");
     $timezones = array();
     foreach ($tzfile as $value) {
         $value = trim($value);
         $value = str_replace('"', '', $value);
         $timezones[$value] = $value;
     }
     $timezone = $form->createElement('select', 'site_timezone')->setMultiOptions($timezones)->setLabel($this->view->translate("Timezone"))->setValue($config->general->timezone);
     $form->getDisplayGroup('general')->addElement($timezone);
     $form->addElement($submit);
     $this->form = $form;
     $this->view->form = $form->render();
     if ($this->getRequest()->isPost()) {
         $this->validateForm();
         return;
     }
     $this->view->form = $this->form->render();
 }
开发者ID:joobsbox,项目名称:joobsbox,代码行数:48,代码来源:Settings.php

示例2: testAddElementToDisplayGroupByElementInstance

 public function testAddElementToDisplayGroupByElementInstance()
 {
     $element = new Zend_Form_Element_Text('foo');
     $this->form->addElement($element);
     $this->form->addDisplayGroup(array($element), 'bar');
     $this->assertNotNull($this->form->getDisplayGroup('bar')->getElement('foo'));
 }
开发者ID:SustainableCoastlines,项目名称:loveyourwater,代码行数:7,代码来源:FormTest.php

示例3: makeOptionCheckbox

 public function makeOptionCheckbox(Zend_Form $form, $elements, $label = 'Options', $displayGroupName = 'options')
 {
     foreach ($elements as $element) {
         $form->getElement($element)->setAttrib('noFormItem', true);
     }
     $form->addDisplayGroup($elements, $displayGroupName);
     $form->getDisplayGroup($displayGroupName)->setAttrib('class', 'form-checkbox')->setAttrib('formItem', 'true')->setLegend($label);
     return $form;
 }
开发者ID:netconstructor,项目名称:Centurion,代码行数:9,代码来源:GridForm.php

示例4: testAddingDisplayGroupShouldPassOptions

 /**
  * @group ZF-3254
  */
 public function testAddingDisplayGroupShouldPassOptions()
 {
     $this->testCanAddAndRetrieveMultipleElements();
     $this->form->addDisplayGroup(array('bar', 'bat'), 'barbat', array('disableLoadDefaultDecorators' => true));
     $group = $this->form->getDisplayGroup('barbat');
     $this->assertTrue($group instanceof Zend_Form_DisplayGroup);
     $decorators = $group->getDecorators();
     $this->assertTrue(is_array($decorators));
     $this->assertTrue(empty($decorators));
 }
开发者ID:vicfryzel,项目名称:zf,代码行数:13,代码来源:FormTest.php

示例5: initForm

 /**
  * initForm
  * @author Thomas Schedler <tsh@massiveart.com>
  * @version 1.0
  */
 protected function initForm()
 {
     $this->objForm = new Zend_Form();
     /**
      * Use our own PluginLoader
      */
     $objLoader = new PluginLoader();
     $objLoader->setPluginLoader($this->objForm->getPluginLoader(PluginLoader::TYPE_FORM_ELEMENT));
     $objLoader->setPluginType(PluginLoader::TYPE_FORM_ELEMENT);
     $this->objForm->setPluginLoader($objLoader, PluginLoader::TYPE_FORM_ELEMENT);
     /**
      * clear all decorators
      */
     $this->objForm->clearDecorators();
     /**
      * add standard decorators
      */
     $this->objForm->addDecorator('TabContainer');
     $this->objForm->addDecorator('FormElements');
     $this->objForm->addDecorator('Form');
     /**
      * add form prefix path
      */
     $this->objForm->addPrefixPath('Form_Decorator', GLOBAL_ROOT_PATH . 'library/massiveart/generic/forms/decorators/', 'decorator');
     /**
      * elements prefixes
      */
     $this->objForm->addElementPrefixPath('Form_Decorator', GLOBAL_ROOT_PATH . 'library/massiveart/generic/forms/decorators/', 'decorator');
     /**
      * regions prefixes
      */
     $this->objForm->addDisplayGroupPrefixPath('Form_Decorator', GLOBAL_ROOT_PATH . 'library/massiveart/generic/forms/decorators/');
     $this->objForm->setAttrib('id', 'genForm');
     $this->objForm->setAttrib('onsubmit', 'return false;');
     $this->objForm->addElement('hidden', 'id', array('decorators' => array('Hidden')));
     $this->objForm->addElement('text', 'title', array('label' => $this->core->translate->_('title', false), 'decorators' => array('Input'), 'columns' => 12, 'class' => 'text keyfield', 'required' => true));
     $this->objForm->addElement('text', 'key', array('label' => $this->core->translate->_('key', false), 'decorators' => array('Input'), 'columns' => 12, 'class' => 'text', 'required' => true));
     $this->objForm->addDisplayGroup(array('title', 'key'), 'main-resource');
     $this->objForm->getDisplayGroup('main-resource')->setLegend($this->core->translate->_('General_information', false));
     $this->objForm->getDisplayGroup('main-resource')->setDecorators(array('FormElements', 'Region'));
     $arrGroups = array();
     $sqlStmt = $this->core->dbh->query("SELECT `id`, `title` FROM `groups` ORDER BY `title`")->fetchAll();
     foreach ($sqlStmt as $arrSql) {
         $arrGroups[$arrSql['id']] = $arrSql['title'];
     }
     $this->objForm->addElement('multiCheckbox', 'groups', array('label' => $this->core->translate->_('groups', false), 'value' => $this->arrGroups, 'decorators' => array('Input'), 'columns' => 6, 'class' => 'multiCheckbox', 'MultiOptions' => $arrGroups));
     $this->objForm->addDisplayGroup(array('groups'), 'groups-group');
     $this->objForm->getDisplayGroup('groups-group')->setLegend($this->core->translate->_('Resource_groups', false));
     $this->objForm->getDisplayGroup('groups-group')->setDecorators(array('FormElements', 'Region'));
 }
开发者ID:BGCX261,项目名称:zoolu-svn-to-git,代码行数:55,代码来源:ResourceController.php

示例6: testAddElementToDisplayGroupByElementInstance

 /**
  * @group ZF-10491
  * @group ZF-10734
  * @group ZF-10731
  */
 public function testAddElementToDisplayGroupByElementInstance()
 {
     $element = new Zend_Form_Element_Text('foo');
     $elementTwo = new Zend_Form_Element_Text('baz-----');
     $this->form->addElements(array($element, $elementTwo));
     $this->form->addDisplayGroup(array($element, $elementTwo), 'bar');
     $displayGroup = $this->form->getDisplayGroup('bar');
     $this->assertNotNull($displayGroup->getElement('foo'));
     $this->assertNotNull($displayGroup->getElement('baz'));
     // clear display groups and elements
     $this->form->clearDisplayGroups()->clearElements();
     $this->form->addDisplayGroup(array($element, $elementTwo), 'bar');
     $displayGroup = $this->form->getDisplayGroup('bar');
     $this->assertNotNull($displayGroup->getElement('foo'));
     $this->assertNotNull($displayGroup->getElement('baz'));
 }
开发者ID:nbcutech,项目名称:o3drupal,代码行数:21,代码来源:FormTest.php

示例7: form


//.........这里部分代码省略.........
     $locations = $location->fetchAll($where, 'name');
     $locationList = array();
     $locationCapacity = array();
     foreach ($locations as $l) {
         $locationList[$l->locationId] = $l->name;
         $locationCapacity['loc_' . $l->locationId] = $l->capacity;
     }
     $locationIds = array_keys($locationList);
     // add the location capacities to the page in js so we can process it as a json object for the "live" max size changing with location selection
     Zend_Layout::getMvcInstance()->getView()->headScript()->appendScript('var locationCapacitiesString = ' . Zend_Json::encode($locationCapacity) . ';');
     $locationElement = $form->createElement('select', 'location', array('label' => 'Location:'));
     $locationElement->setMultiOptions($locationList)->setValue(isset($values['locationId']) ? $values['locationId'] : $locationCapacity['loc_' . $locationIds[0]]);
     $date = $form->createElement('text', 'date', array('label' => 'Date:'));
     $date->setRequired(true)->addFilter('StringTrim')->addFilter('StripTags')->setAttrib('maxlength', '128')->setAttrib('style', 'width: 200px')->setValue(isset($values['date']) ? strftime('%A, %B %e, %Y', strtotime($values['date'])) : '');
     $password = $form->createElement('text', 'password', array('label' => 'Event Password:'));
     $password->addFilter('StringTrim')->addFilter('StripTags')->setAttrib('maxlength', '100')->setValue(isset($values['password']) ? $values['password'] : '');
     // add the start time selector
     $startTimeSub = new Zend_Form_SubForm();
     $startTimeSub->setDecorators(array('FormElements', array('HtmlTag', array('tag' => 'div', 'class' => 'zend_form'))));
     $startTimeSub->setAttrib('class', 'sub');
     $startTimeHour = $startTimeSub->createElement('select', 'hour', array('label' => 'Start Time:'));
     for ($i = 1; $i <= 12; $i++) {
         $startTimeHour->addMultiOption($i, $i);
     }
     $startTimeHour->setDecorators(array(array('ViewHelper', array('helper' => 'formSelect')), array('Label')));
     $startTimeHour->setValue(isset($values['startTime']) ? date('g', strtotime($values['startTime'])) : date('g'));
     $startTimeMinute = $startTimeSub->createElement('select', 'minute');
     for ($i = 0; $i < 60; $i += 5) {
         $startTimeMinute->addMultiOption(str_pad($i, 2, '0', STR_PAD_LEFT), str_pad($i, 2, '0', STR_PAD_LEFT));
     }
     $startTimeMinute->setDecorators(array(array('ViewHelper', array('helper' => 'formSelect'))));
     $startTimeMinute->setValue(isset($values['startTime']) ? date('i', strtotime($values['startTime'])) : date('i'));
     $startTimeMeridian = $startTimeSub->createElement('select', 'meridian');
     $startTimeMeridian->addMultiOption('am', 'AM')->addMultiOption('pm', 'PM')->setDecorators(array(array('ViewHelper', array('helper' => 'formSelect'))));
     $startTimeMeridian->setValue(isset($values['startTime']) ? date('a', strtotime($values['startTime'])) : date('a'));
     $startTimeSub->addElements(array($startTimeHour, $startTimeMinute, $startTimeMeridian));
     // add the end time selector
     $endTimeSub = new Zend_Form_SubForm();
     $endTimeSub->setDecorators(array('FormElements', array('HtmlTag', array('tag' => 'div', 'class' => 'zend_form'))));
     $endTimeSub->setAttrib('class', 'sub');
     $endTimeHour = $endTimeSub->createElement('select', 'hour', array('label' => 'End Time:'));
     for ($i = 1; $i <= 12; $i++) {
         $endTimeHour->addMultiOption($i, $i);
     }
     $endTimeHour->setDecorators(array(array('ViewHelper', array('helper' => 'formSelect')), array('Label')));
     $endTimeHour->setValue(isset($values['endTime']) ? date('g', strtotime($values['endTime'])) : date('g'));
     $endTimeMinute = $endTimeSub->createElement('select', 'minute');
     for ($i = 0; $i < 60; $i += 5) {
         $endTimeMinute->addMultiOption(str_pad($i, 2, '0', STR_PAD_LEFT), str_pad($i, 2, '0', STR_PAD_LEFT));
     }
     $endTimeMinute->setDecorators(array(array('ViewHelper', array('helper' => 'formSelect'))));
     $endTimeMinute->setValue(isset($values['endTime']) ? date('i', strtotime($values['endTime'])) : date('i'));
     $endTimeMeridian = $endTimeSub->createElement('select', 'meridian');
     $endTimeMeridian->addMultiOption('am', 'AM')->addMultiOption('pm', 'PM')->setDecorators(array(array('ViewHelper', array('helper' => 'formSelect'))));
     $endTimeMeridian->setValue(isset($values['endTime']) ? date('a', strtotime($values['endTime'])) : date('a'));
     $endTimeSub->addElements(array($endTimeHour, $endTimeMinute, $endTimeMeridian));
     // get all the users available for the instructor list
     $otAccount = new Ot_Account();
     $accounts = $otAccount->fetchAll(null, array('lastName', 'firstName'))->toArray();
     $instructorList = array();
     foreach ($accounts as $a) {
         $instructorList[$a['accountId']] = $a['lastName'] . ", " . $a['firstName'];
     }
     $instructorElement = $form->createElement('multiselect', 'instructors', array('label' => 'Instructor(s):'));
     $instructorElement->setMultiOptions($instructorList)->setAttrib('size', 10)->setValue(isset($values['instructorIds']) ? $values['instructorIds'] : '');
     $minSize = $form->createElement('text', 'minSize', array('label' => 'Min Size:'));
     $minSize->setRequired(true)->addFilter('StringTrim')->addFilter('StripTags')->setAttrib('maxlength', '64')->setAttrib('style', 'width: 50px;')->setValue(isset($values['minSize']) ? $values['minSize'] : $config->user->defaultMinWorkshopSize->val);
     $maxSize = $form->createElement('text', 'maxSize', array('label' => 'Max Size:'));
     $maxSize->setRequired(true)->addFilter('StringTrim')->addFilter('StripTags')->setAttrib('maxlength', '64')->setAttrib('style', 'width: 50px;')->setValue(isset($values['maxSize']) ? $values['maxSize'] : $locationElement->getValue());
     $waitlistSize = $form->createElement('text', 'waitlistSize', array('label' => 'Waitlist Size:'));
     $waitlistSize->setRequired(true)->addFilter('StringTrim')->addFilter('StripTags')->setAttrib('maxlength', '64')->setAttrib('style', 'width: 50px;')->setValue(isset($values['waitlistSize']) ? $values['waitlistSize'] : $config->user->defaultWorkshopWaitlistSize->val);
     $evaluationType = $form->createElement('select', 'evaluationType', array('label' => 'Evaluation Type:'));
     $evaluationType->setMultiOptions(array('default' => 'Default', 'google' => 'Google Form'))->setRequired(true)->setValue(isset($values['evaluationType']) ? $values['evaluationType'] : 'default');
     $formKey = $form->createElement('textarea', 'formKey', array('label' => 'Google Form Question Key:'));
     $formKey->setAttribs(array('cols' => '10', 'rows' => '5', 'style' => 'width : 250px;'))->addDecorators(array('ViewHelper', 'Errors', 'HtmlTag', array('Label', array('tag' => 'span')), array(array('elementDiv' => 'HtmlTag'), array('tag' => 'div', 'id' => 'formKey', 'class' => 'elm'))))->setValue(isset($values['formKey']) ? $values['formKey'] : '');
     $answerKey = $form->createElement('textarea', 'answerKey', array('label' => 'Google Form Answer Key:'));
     $answerKey->addFilter('StringTrim')->addFilter('StripTags')->setAttribs(array('cols' => '10', 'rows' => '3', 'style' => 'width : 250px;'))->addDecorators(array('ViewHelper', 'Errors', 'HtmlTag', array('Label', array('tag' => 'span')), array(array('elementDiv' => 'HtmlTag'), array('tag' => 'div', 'id' => 'answerKey', 'class' => 'elm'))))->setValue(isset($values['answerKey']) ? $values['answerKey'] : '');
     $submit = $form->createElement('submit', 'submitButton', array('label' => 'Submit'));
     $submit->setDecorators(array(array('ViewHelper', array('helper' => 'formSubmit'))));
     $cancel = $form->createElement('button', 'cancel', array('label' => 'Cancel'));
     $cancel->setAttrib('id', 'cancel');
     $cancel->setDecorators(array(array('ViewHelper', array('helper' => 'formButton'))));
     $form->addElements(array($workshopElement, $locationElement, $password, $date, $evaluationType))->addSubForms(array('startTime' => $startTimeSub, 'endTime' => $endTimeSub))->addElements(array($minSize, $maxSize, $waitlistSize, $instructorElement));
     $form->addDisplayGroup(array('instructors'), 'instructors-group', array('legend' => 'Instructors'));
     $form->addDisplayGroup(array('workshop', 'password', 'location', 'minSize', 'maxSize', 'waitlistSize'), 'generalInformation', array('legend' => 'General Information'));
     $form->setElementDecorators(array('ViewHelper', 'Errors', array('HtmlTag', array('tag' => 'div', 'class' => 'elm')), array('Label', array('tag' => 'span'))))->addElements(array($submit, $cancel));
     $form->addElements(array($evaluationType, $formKey, $answerKey));
     $form->addDisplayGroup(array('evaluationType', 'formKey', 'answerKey'), 'evaluationTypes', array('legend' => 'Evaluations'));
     $form->addDisplayGroup(array('submitButton', 'cancel'), 'buttons');
     $form->setDisplayGroupDecorators(array('FormElements', array('HtmlTag', array('tag' => 'div', 'class' => 'widget-content')), array(array('elementDiv' => 'HtmlTag'), array('tag' => 'div', 'class' => array('widget-footer', 'ui-corner-bottom'), 'placement' => Zend_Form_Decorator_Abstract::APPEND)), array('FieldSet', array('class' => 'formField'))));
     $buttons = $form->getDisplayGroup('buttons');
     $buttons->setDecorators(array('FormElements', array('HtmlTag', array('tag' => 'div', 'style' => 'clear : both;'))));
     if (isset($values['eventId'])) {
         $eventId = $form->createElement('hidden', 'eventId');
         $eventId->setValue($values['eventId']);
         $eventId->setDecorators(array(array('ViewHelper', array('helper' => 'formHidden'))));
         $form->addElement($eventId);
     }
     return $form;
 }
开发者ID:ncsuwebdev,项目名称:classmate,代码行数:101,代码来源:Event.php

示例8: initForm

 /**
  * initForm
  * @author Thomas Schedler <tsh@massiveart.com>
  * @version 1.0
  */
 protected function initForm()
 {
     $this->objForm = new Zend_Form();
     /**
      * Use our own PluginLoader
      */
     $objLoader = new PluginLoader();
     $objLoader->setPluginLoader($this->objForm->getPluginLoader(PluginLoader::TYPE_FORM_ELEMENT));
     $objLoader->setPluginType(PluginLoader::TYPE_FORM_ELEMENT);
     $this->objForm->setPluginLoader($objLoader, PluginLoader::TYPE_FORM_ELEMENT);
     /**
      * clear all decorators
      */
     $this->objForm->clearDecorators();
     /**
      * add standard decorators
      */
     $this->objForm->addDecorator('TabContainer');
     $this->objForm->addDecorator('FormElements');
     $this->objForm->addDecorator('Form');
     /**
      * add form prefix path
      */
     $this->objForm->addPrefixPath('Form_Decorator', GLOBAL_ROOT_PATH . 'library/massiveart/generic/forms/decorators/', 'decorator');
     /**
      * elements prefixes
      */
     $this->objForm->addElementPrefixPath('Form_Decorator', GLOBAL_ROOT_PATH . 'library/massiveart/generic/forms/decorators/', 'decorator');
     /**
      * regions prefixes
      */
     $this->objForm->addDisplayGroupPrefixPath('Form_Decorator', GLOBAL_ROOT_PATH . 'library/massiveart/generic/forms/decorators/');
     $arrGroupTypeOptions = array();
     $sqlStmt = $this->core->dbh->query("SELECT `id`, `title` FROM `groupTypes`")->fetchAll();
     foreach ($sqlStmt as $arrSql) {
         $arrGroupTypeOptions[$arrSql['id']] = ucfirst($arrSql['title']);
     }
     $this->objForm->setAttrib('id', 'genForm');
     $this->objForm->setAttrib('onsubmit', 'return false;');
     $this->objForm->addElement('hidden', 'id', array('decorators' => array('Hidden')));
     $this->objForm->addElement('text', 'title', array('label' => $this->core->translate->_('title', false), 'decorators' => array('Input'), 'columns' => 12, 'class' => 'text keyfield', 'required' => true));
     $this->objForm->addElement('text', 'key', array('label' => $this->core->translate->_('key', false), 'decorators' => array('Input'), 'columns' => 12, 'class' => 'text', 'required' => true));
     $this->objForm->addElement('textarea', 'description', array('label' => $this->core->translate->_('description', false), 'decorators' => array('Input'), 'columns' => 12, 'class' => 'text'));
     $this->objForm->addElement('multiCheckbox', 'groupTypes', array('label' => $this->core->translate->_('groupTypes', false), 'value' => $this->arrGroupTypes, 'decorators' => array('Input'), 'columns' => 6, 'class' => 'multiCheckbox', 'MultiOptions' => $arrGroupTypeOptions));
     $this->objForm->addDisplayGroup(array('title', 'key', 'description', 'groupTypes'), 'main-group', array('columns' => 9));
     $this->objForm->getDisplayGroup('main-group')->setLegend($this->core->translate->_('General_information', false));
     $this->objForm->getDisplayGroup('main-group')->setDecorators(array('FormElements', 'Region'));
     $arrPermissionOptions = array();
     $sqlStmt = $this->core->dbh->query("SELECT `id`, UCASE(`title`) AS title FROM `permissions`")->fetchAll();
     foreach ($sqlStmt as $arrSql) {
         $arrPermissionOptions[$arrSql['id']] = $arrSql['title'];
     }
     $arrLanguageOptions = array();
     $arrLanguageOptions['0'] = $this->core->translate->_('All_languages', false);
     $sqlStmt = $this->core->dbh->query("SELECT `id`, `title` FROM `languages`")->fetchAll();
     foreach ($sqlStmt as $arrSql) {
         $arrLanguageOptions[$arrSql['id']] = $arrSql['title'];
     }
     $strRegionInstances = '';
     $intRegionCounter = 0;
     /**
      * create group permisson regions
      */
     foreach ($this->arrPermissions as $arrPermission) {
         $intRegionCounter++;
         $this->objForm->addElement('radio', 'language_' . $intRegionCounter, array('label' => $this->core->translate->_('language', false), 'value' => $arrPermission['language'], 'decorators' => array('Input'), 'columns' => 6, 'class' => 'radio', 'MultiOptions' => $arrLanguageOptions));
         $this->objForm->addElement('multiCheckbox', 'permissions_' . $intRegionCounter, array('label' => $this->core->translate->_('permissions', false), 'value' => $arrPermission['permissions'], 'decorators' => array('Input'), 'columns' => 6, 'class' => 'multiCheckbox', 'MultiOptions' => $arrPermissionOptions));
         $this->objForm->addDisplayGroup(array('language_' . $intRegionCounter, 'permissions_' . $intRegionCounter), 'Permission_' . $intRegionCounter, array('columns' => 9, 'regionTypeId' => 1, 'collapsable' => 0, 'regionCounter' => $intRegionCounter, 'regionId' => 'Permission', 'regionExt' => $intRegionCounter, 'isMultiply' => true, 'regionTitle' => $this->core->translate->_('Language_specific', false)));
         $this->objForm->getDisplayGroup('Permission_' . $intRegionCounter)->setLegend($this->core->translate->_('Permissions', false));
         $this->objForm->getDisplayGroup('Permission_' . $intRegionCounter)->setDecorators(array('FormElements', 'Region'));
         $strRegionInstances .= '[' . $intRegionCounter . ']';
     }
     $this->objForm->addElement('radio', 'language_REPLACE_n', array('label' => $this->core->translate->_('language', false), 'decorators' => array('Input'), 'columns' => 6, 'class' => 'radio', 'MultiOptions' => $arrLanguageOptions));
     $this->objForm->addElement('multiCheckbox', 'permissions_REPLACE_n', array('label' => $this->core->translate->_('permissions', false), 'decorators' => array('Input'), 'columns' => 6, 'class' => 'multiCheckbox', 'MultiOptions' => $arrPermissionOptions));
     $this->objForm->addDisplayGroup(array('language_REPLACE_n', 'permissions_REPLACE_n'), 'Permission_REPLACE_n', array('columns' => 9, 'regionTypeId' => 1, 'collapsable' => 0, 'regionId' => 'Permission', 'regionExt' => 'REPLACE_n', 'isMultiply' => true, 'isEmptyWidget' => true, 'regionTitle' => $this->core->translate->_('Language_specific', false)));
     $this->objForm->getDisplayGroup('Permission_REPLACE_n')->setLegend('Rechte');
     $this->objForm->getDisplayGroup('Permission_REPLACE_n')->setDecorators(array('FormElements', 'Region'));
     $this->objForm->addElement('hidden', 'Region_Permission_Instances', array('value' => $strRegionInstances, 'decorators' => array('Hidden')));
     $this->objForm->addElement('hidden', 'Region_Permission_Order', array('value' => '', 'decorators' => array('Hidden')));
 }
开发者ID:BGCX261,项目名称:zoolu-svn-to-git,代码行数:85,代码来源:GroupController.php


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