本文整理汇总了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;
}
示例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);
}
示例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;
}