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


PHP Zend_Form_SubForm::getView方法代码示例

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


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

示例1: getView

 /**
  * Get view
  *
  * @return Zend_View_Interface
  */
 public function getView()
 {
     $view = parent::getView();
     if (!$this->_dojoViewPathRegistered) {
         if (false === $view->getPluginLoader('helper')->getPaths('Zend_Dojo_View_Helper')) {
             $view->addHelperPath('Zend/Dojo/View/Helper', 'Zend_Dojo_View_Helper');
         }
         $this->_dojoViewPathRegistered = true;
     }
     return $view;
 }
开发者ID:netvlies,项目名称:zf,代码行数:16,代码来源:SubForm.php

示例2: getSubFormMarkup

 /**
  *
  * @param Zend_Form_SubForm $form
  * @return string 
  */
 protected function getSubFormMarkup(Zend_Form_SubForm $form)
 {
     $content = '<h3 class="accordion-header"><a href="#">' . $form->getLegend() . '</a></h3>' . '<div id="' . $form->getId() . '" class="accordion-content"><ul><li>' . '<table cellspacing="0" cellpadding="0" border="0" align="left"><tbody>';
     $output = '';
     $elements = $form->getElements();
     if (is_array($elements)) {
         foreach ($elements as $element) {
             $element->setView($form->getView());
             $output = $this->getElementMarkup($element, $output);
         }
     }
     return $content . $output . '</tbody></table></li></ul></div>';
 }
开发者ID:UnicodeSystems-PrivateLimited,项目名称:Zendfox,代码行数:18,代码来源:Accordion.php

示例3: getSubFormMarkup

 protected function getSubFormMarkup(Zend_Form_SubForm $form)
 {
     $content = '<div id="' . $form->getId() . '" class="tab">' . '<h2>' . $form->getLegend() . '</h2>' . '<table cellspacing="0" cellpadding="0" border="0" align="left"><tbody>';
     $this->tabContent[] = array('title' => $form->getLegend(), 'desc' => $form->getDescription());
     $output = '';
     $elements = $form->getElements();
     if (is_array($elements)) {
         foreach ($elements as $element) {
             $element->setView($form->getView());
             $output = $this->getElementMarkup($element, $output);
         }
     }
     return $content . $output . '</tbody></table></div>';
 }
开发者ID:UnicodeSystems-PrivateLimited,项目名称:Zendfox,代码行数:14,代码来源:Plain.php

示例4: __construct

 /**
  * Class constructor
  *
  * @return void
  */
 public function __construct($options)
 {
     $this->_addSubmitSaveClose = true;
     parent::__construct($options);
     $imageSrc = $options['imageSrc'];
     $dataId = $options['dataId'];
     $imgField = $options['imgField'];
     $isNewImage = $options['isNewImage'];
     $moduleName = $options['moduleName'];
     $productFormLeft = new Zend_Form_SubForm();
     $productFormRight = new Zend_Form_SubForm();
     $productFormBotPub = new Zend_Form_SubForm();
     $productFormBotPro = new Zend_Form_SubForm();
     if ($dataId == '') {
         $pathTmp = "../../../../../data/images/" . $moduleName . "/tmp";
     } else {
         $pathTmp = "../../../../../data/images/" . $moduleName . "/" . $dataId . "/tmp";
     }
     // hidden specify if new image for the news
     $newImage = new Zend_Form_Element_Hidden('isNewImage', array('value' => $isNewImage));
     $newImage->removeDecorator('Label');
     $productFormRight->addElement($newImage);
     // Name of the product line
     $name = new Zend_Form_Element_Text('PI_Name');
     $name->setLabel($productFormLeft->getView()->getCibleText('product_label_name') . "<span class='field_required'>*</span>")->setRequired(true)->addFilter('StripTags')->addFilter('StringTrim')->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => $productFormLeft->getView()->getCibleText('validation_message_empty_field'))))->setDecorators(array('ViewHelper', array('label', array('placement' => 'prepend')), array('Errors', array('placement' => 'append')), array(array('row' => 'HtmlTag'), array('tag' => 'dd', 'class' => 'form_title_inline', 'id' => 'title'))))->setAttrib('class', 'stdTextInput');
     $label = $name->getDecorator('Label');
     $label->setOption('class', $this->_labelCSS);
     $productFormLeft->addElement($name);
     // List of sub categories
     $oSubCategories = new SubCategoriesObject();
     $listSubCat = $oSubCategories->subcatCollection(Zend_Registry::get('currentEditLanguage'));
     $subCategories = new Zend_Form_Element_Select('P_SubCategoryID');
     $subCategories->setLabel($productFormLeft->getView()->getCibleText('form_products_subcat_label') . "<span class='field_required'>*</span>")->setAttrib('class', 'largeSelect')->setRequired(true)->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => $productFormLeft->getView()->getCibleText('validation_message_empty_field'))));
     $subCategories->addMultiOption('', $this->getView()->getCibleText('form_select_default_label'));
     $subCategories->addMultiOptions($listSubCat);
     $productFormLeft->addElement($subCategories);
     // Checkbox for new product
     $isNewProd = new Zend_Form_Element_Checkbox('P_New');
     $isNewProd->setLabel($productFormLeft->getView()->getCibleText('form_product_isnew_label'));
     $isNewProd->setDecorators(array('ViewHelper', array('label', array('placement' => 'append')), array(array('row' => 'HtmlTag'), array('tag' => 'dd', 'class' => 'label_after_checkbox'))));
     $productFormLeft->addElement($isNewProd);
     // id of the associated meta data
     $metaTagId = new Zend_Form_Element_Hidden('PI_MetaId');
     $metaTagId->removeDecorator('Label');
     $productFormLeft->addElement($metaTagId);
     // Image for the product line
     $imageTmp = new Zend_Form_Element_Hidden($imgField . '_tmp');
     $imageTmp->removeDecorator('Label');
     $productFormRight->addElement($imageTmp);
     $imageOrg = new Zend_Form_Element_Hidden($imgField . '_original');
     $imageOrg->removeDecorator('Label');
     $productFormRight->addElement($imageOrg);
     $imageView = new Zend_Form_Element_Image($imgField . '_preview', array('onclick' => 'return false;'));
     $imageView->setImage($imageSrc);
     $productFormRight->addElement($imageView);
     $imagePicker = new Cible_Form_Element_ImagePicker($imgField, array('onchange' => "document.getElementById('imageView').src = document.getElementById('" . $imgField . "').value", 'associatedElement' => $imgField . '_preview', 'pathTmp' => $pathTmp, 'contentID' => $dataId));
     $imagePicker->removeDecorator('Label');
     $productFormRight->addElement($imagePicker);
     //Keywords field
     $keywords = new Zend_Form_Element_Text('PI_MotsCles');
     $keywords->setLabel($productFormLeft->getView()->getCibleText('form_product_keywords_label'))->addFilter('StripTags')->addFilter('StringTrim')->setDecorators(array('ViewHelper', array('label', array('placement' => 'prepend')), array(array('row' => 'HtmlTag'), array('tag' => 'dd', 'class' => 'form_title_inline marginTop30', 'id' => 'title'))))->setAttrib('class', 'largeTextInput');
     $label = $keywords->getDecorator('Label');
     $label->setOption('class', $this->_labelCSS);
     $productFormLeft->addElement($keywords);
     // Description of the product
     $descrPublic = new Cible_Form_Element_Editor('PI_DescriptionPublic', array('mode' => Cible_Form_Element_Editor::ADVANCED, 'subFormID' => 'productFormBotPub'));
     $descrPublic->setLabel($this->getView()->getCibleText('product_label_descriptionPublic'))->setAttrib('class', 'largeEditor');
     $label = $descrPublic->getDecorator('label');
     $label->setOption('class', $this->_labelCSS);
     $productFormBotPub->addElement($descrPublic);
     // Technical specs of the product for public.
     $urlTechFile = new Zend_Form_Element_Hidden('PI_FicheTechniquePublicPDF');
     $urlTechFile->removeDecorator('Label');
     $productFormBotPub->addElement($urlTechFile);
     $techfile = new Zend_Form_Element_Hidden('technicalSpecsName');
     $techfile->removeDecorator('Label');
     $productFormBotPub->addElement($techfile);
     // Technical specs of the product.
     $technicalSpecs = new Cible_Form_Element_FileManager('PI_FicheTechniquePublicPDF', array('associatedElement' => 'productFormBotPub', 'displayElement' => 'technicalSpecsName', 'pathTmp' => $this->_filePath, 'contentID' => $this->_dataId, 'setInit' => true));
     $technicalSpecs->setLabel($productFormBotPub->getView()->getCibleText('product_label_technical_specs'))->addFilter('StripTags')->addFilter('StringTrim')->setDecorators(array('ViewHelper', array('label', array('placement' => 'prepend')), array(array('row' => 'HtmlTag'), array('tag' => 'dd', 'class' => 'form_title_inline', 'id' => 'title'))))->setAttrib('class', 'stdTextInput');
     $label = $technicalSpecs->getDecorator('Label');
     $label->setOption('class', $this->_labelCSS);
     $productFormBotPub->addElement($technicalSpecs);
     //-----------------------------------------------------
     // Description of the product for pro
     $descrPro = new Cible_Form_Element_Editor('PI_DescriptionPro', array('mode' => Cible_Form_Element_Editor::ADVANCED, 'subFormID' => 'productFormBotPro'));
     $descrPro->setLabel($this->getView()->getCibleText('product_label_descriptionPro'))->setAttrib('class', 'largeEditor');
     $label = $descrPro->getDecorator('label');
     $label->setOption('class', $this->_labelCSS);
     $productFormBotPro->addElement($descrPro);
     // Technical specs of the product for pro.
     $urlTechFile = new Zend_Form_Element_Hidden('PI_FicheTechniqueProPDF');
     $urlTechFile->removeDecorator('Label');
     $productFormLeft->addElement($urlTechFile);
     $techfile = new Zend_Form_Element_Hidden('technicalSpecsPro');
//.........这里部分代码省略.........
开发者ID:anunay,项目名称:stentors,代码行数:101,代码来源:FormProducts.php


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