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


PHP Zend_View::formSelect方法代码示例

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


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

示例1: render

 public function render()
 {
     /* bind optional action to field */
     if ($this->_obj->getAction()) {
         $this->_bindAction($this->_obj->getAction());
         View::addEvent(sprintf("jQuery('#%s').focus()", $this->_id), 'js');
     }
     $name = $this->getId();
     if ($this->getParameter('mode') == View\FormComponent::SEARCH_MODE) {
         $name = ViewUri::getUriAdapter()->getIdentifier('search') . '[' . $this->_nametoDomId($name) . ']';
     }
     $html = sprintf('<input type="hidden" name="%s" id="%s" value="%s"/>', $name, $this->_obj->getId(), $this->_obj->getValue());
     $zv = new \Zend_View();
     $options = array(null => $this->getParameter('defaultlabel')) + $this->_obj->getEnumValues(TimeProperty::HOUR_PART);
     $html .= $zv->formSelect($name . '_hour', $this->_obj->getValue(TimeProperty::HOUR_PART), null, $options);
     $options = array(null => $this->getParameter('defaultlabel')) + $this->_obj->getEnumValues(TimeProperty::MIN_PART);
     $html .= ' : ' . $zv->formSelect($name . '_minute', $this->_obj->getValue(TimeProperty::MIN_PART), null, $options);
     View::addCoreLib('view:form.js');
     View::addEvent(sprintf("new t41.view.form.timeElement('%s')", $this->_obj->getId()), 'js');
     return $html;
 }
开发者ID:crapougnax,项目名称:t41,代码行数:21,代码来源:WebDefault.php

示例2: loadTreeMenuSelectBox

 public function loadTreeMenuSelectBox($name, $FirstItem = null, $selected = null, $attribsSelect = null, $subtractId = null)
 {
     $objMenus = new Model_Menus();
     $FirstItem = $FirstItem == null ? 0 : $FirstItem;
     $menuLevelOnes = $objMenus->fetchAll("parent = {$FirstItem}", "order ASC");
     $options = array();
     if ($FirstItem == 0) {
         $options[0] = "/ ROOT";
     } else {
         $options[0] = $objMenus->fetchRow("menu_id = {$FirstItem}")->name;
     }
     $this->_loadMenuTree($menuLevelOnes, $options, 1, $subtractId);
     $view = new Zend_View();
     return $view->formSelect($name, $selected, $attribsSelect, $options);
 }
开发者ID:ngukho,项目名称:ducbui-cms,代码行数:15,代码来源:LoadTreeMenuSelectBox.php

示例3: render

 public function render()
 {
     /* bind optional action to field */
     if ($this->_obj->getAction()) {
         $this->_bindAction($this->_obj->getAction());
         View::addEvent(sprintf("jQuery('#%s').focus()", $this->_id), 'js');
     }
     $name = $this->getId();
     $value = explode('.', $this->_obj->getValue());
     if ($this->getParameter('mode') == View\FormComponent::SEARCH_MODE) {
         $name = ViewUri::getUriAdapter()->getIdentifier('search') . '[' . $this->_nametoDomId($name) . ']';
     }
     $html = sprintf('<input type="hidden" name="%s" id="%s" value="%s"/>', $name, $this->_obj->getId(), $this->_obj->getValue());
     $html .= sprintf('<input type="text" id="%s_number" size="3" maxlength="4"/>', $this->_obj->getId());
     $options = array('2' => 'Bis', '3' => 'Ter', '4' => 'Quater', 'A' => 'A', 'B' => 'B', 'C' => 'C', 'D' => 'D');
     $options = array(null => $this->getParameter('defaultlabel')) + $options;
     $zv = new \Zend_View();
     $html .= $zv->formSelect(null, null, array('id' => $this->_obj->getId() . '_ext'), $options);
     View::addCoreLib('view:form.js');
     View::addEvent(sprintf("new t41.view.form.streetNumber('%s')", $this->_obj->getId()), 'js');
     return $html;
 }
开发者ID:crapougnax,项目名称:t41,代码行数:22,代码来源:WebStreetNumber.php


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