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


PHP Zend_View_Interface::formSelect方法代码示例

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


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

示例1: selectLanguage

 /**
  *
  */
 public function selectLanguage($name, $value, $attribs = null)
 {
     //select version
     $config = Zend_Registry::get('config');
     $siteVersions = $config->language->translations;
     foreach ($siteVersions as $locale => $label) {
         $data[$locale] = $this->view->getTranslation($label);
     }
     return $this->view->formSelect($name, $value, $attribs, $data);
 }
开发者ID:ngukho,项目名称:ducbui-cms,代码行数:13,代码来源:SelectLanguage.php

示例2: getHtml

 /**
  *
  * @param array $value
  * @param Zend_View_Interface $view
  * @return string
  */
 public static function getHtml($value, Zend_View_Interface $view = null)
 {
     $value = json_decode($value, true);
     foreach (self::_getOptions() as $options) {
         switch ($options['type']) {
             case 'bool':
                 $html .= $view->formRadio('confValue[' . $options['name'] . ']', $value[$options['id']], null, array('1' => Axis::translate()->__(' Yes'), '0' => Axis::translate()->__(' No')));
                 break;
             case 'select':
                 $html .= $view->formSelect('confValue[' . $options['name'] . ']', $value[$options['id']], null, $options['config_options']);
                 break;
             case 'multiple':
                 $html .= '<br />';
                 foreach ($options['config_options'] as $key => $dataItem) {
                     $html .= $view->formCheckbox('confValue[' . $options['name'] . '][' . $key . ']', isset($value[$options['name']][$key]) && $value[$options['name']][$key] ? 1 : null, null, array(1, 0)) . " {$dataItem} <br /> ";
                 }
                 break;
             case 'text':
                 $html .= $view->formTextarea('confValue[' . $options['name'] . ']', $value[$options['id']], array('rows' => 8, 'cols' => 45));
                 break;
             default:
                 $html .= $view->formText('confValue[' . $options['name'] . ']', $value[$options['id']], array('size' => '50'));
         }
     }
     return $html;
 }
开发者ID:rommmka,项目名称:axiscommerce,代码行数:32,代码来源:TestJson.php

示例3: _rowCompetence

    public function _rowCompetence(array $competence, array $ratings, $in_person = FALSE)
    {
        static $standsCounter = 0;
        static $additsCounter = 0;
        $competen = new Rp_Db_Table_Ach_Cards_Competences();
        $competen = $competen->find($competence['id'])->current();
        $num = $competence['additional'] ? ++$additsCounter : ++$standsCounter;
        $name = $in_person === TRUE ? 'competences_in_person[' . $competence['id'] . ']' : 'competences[' . $competence['id'] . ']';
        $kol = count($competen->fetchPersonalNotes($competen->id));
        $note1 = '<div style="display:none" onclick="openNotesCompetence(' . $competence['id'] . ', 1)" title="Заметки">' . $kol . '</div>';
        return '
			<tr>
				<td class="compets-field-num">
					<div>' . $num . '</div>
				</td>
				<td class="compets-field-name">
					<div>' . $competence['name'] . '<div>' . $competence['target'] . '</div></div>
				</td>
				<td class="compets-field-note">
					' . $note1 . '
				</td>
				<td class="compets-field-result">
					<textarea name="' . $name . '[result_personal]" readonly="readonly">' . $competence['result_personal'] . '</textarea>
				</td>
				<td class="compets-field-rating">
					' . $this->view->formSelect($name . '[rating_id_personal]', $competence['rating_id_personal'], null, $ratings) . '
					<div>' . $ratings[$competence['rating_id_personal']] . '</div>
				</td>
			</tr>
		';
    }
开发者ID:ROLF-IT-Department,项目名称:rolf-personnel,代码行数:31,代码来源:AchievsFormPersonal.php

示例4: instanceSelect

 /**
  * Generates a drop down box listing all instances that belong to the chosen instance
  *
  * @param  Array   list of all instances to which this user has access
  * @return string
  */
 public function instanceSelect($instances)
 {
     $options[0] = ' ';
     foreach ($instances as $instance) {
         $options[$instance->instanceID] = $this->view->h($instance->instanceName);
     }
     return $this->view->formSelect('instance', null, null, $options);
 }
开发者ID:humansky,项目名称:qframe,代码行数:14,代码来源:CompareHelpers.php

示例5: _rowTraining

    private function _rowTraining(Zend_Db_Table_Row_Abstract $training, array $methods, array $groupsMethods, array $respons, array $months, array $groupsMethodsActual)
    {
        static $counter = 0;
        if (empty($training->id)) {
            $num = '*';
            $name = 'trainingPattern';
            $class = 'row-pattern';
            $toggle = '<div class="toggle-cancel-train" onclick="Card.removeRow(this)">&nbsp;</div>';
            end($months);
            $training->method_id = key($methods);
            $training->month_term_id = key($months);
            $training->responsible_id = key($respons);
        } else {
            $num = ++$counter;
            $name = 'trainings[' . $training->id . ']';
            $class = '';
            $toggle = '';
        }
        $groupMethodsName = '';
        foreach ($groupsMethods as $groupName => $items) {
            if (array_key_exists($training->method_id, $items)) {
                $groupMethodsName = $groupName;
                break;
            }
        }
        return '
			<tr class="' . $class . '">
				<td class="trains-field-num">
					<div>' . $num . '</div>' . $toggle . '
				</td>
				<td class="trains-field-situation">
					<textarea name="' . $name . '[situation]" readonly>' . $training->situation . '</textarea>
				</td>
				<td class="trains-field-objective">
					<textarea name="' . $name . '[objective]" readonly>' . $training->objective . '</textarea>
				</td>
				<td class="trains-field-method">
					' . $this->view->formSelect($name . '[method_id]', $training->method_id, null, $groupsMethodsActual) . '
					<div title="' . $groupMethodsName . '">' . $groupMethodsName . '
						<div title="' . $methods[$training->method_id] . '">' . $methods[$training->method_id] . '</div>
					</div>
					<textarea name="' . $name . '[method_comment]" readonly>' . $training->method_comment . '</textarea>
				</td>
				<td class="trains-field-responsible">
					' . $this->view->formSelect($name . '[responsible_id]', $training->responsible_id, null, $respons) . '
					<div>' . $respons[$training->responsible_id] . '</div>
					<textarea name="' . $name . '[responsible_comment]" readonly>' . $training->responsible_comment . '</textarea>
				</td>
				<td class="trains-field-term">
					' . $this->view->formSelect($name . '[month_term_id]', $training->month_term_id, null, $months) . '
					<div>' . $months[$training->month_term_id] . '</div>
				</td>
				<td class="trains-field-result">
					<textarea name="' . $name . '[result]" readonly>' . $training->result . '</textarea>
				</td>
			</tr>
		';
    }
开发者ID:ROLF-IT-Department,项目名称:rolf-personnel,代码行数:58,代码来源:AchievsFormTrainings.php

示例6: selectLayout

 /**
  *
  */
 public function selectLayout($name, $value = null, $attr = null, $defaut = null)
 {
     $config = Zend_Registry::get('config');
     $pathToPublicLayouts = $config->design->pathToPublicLayouts;
     $layouts = Digitalus_Filesystem_File::getFilesByType($pathToPublicLayouts, 'phtml');
     if ($defaut == NULL) {
         $defaut = $this->view->getTranslation('Select One');
     }
     $options[0] = $defaut;
     if (is_array($layouts)) {
         foreach ($layouts as $layout) {
             $options[$layout] = $layout;
         }
         return $this->view->formSelect($name, $value, $attr, $options);
     } else {
         return null;
     }
 }
开发者ID:ngukho,项目名称:ducbui-cms,代码行数:21,代码来源:SelectLayout.php

示例7: selectSkin

 /**
  *
  */
 public function selectSkin($name, $value = null, $attr = null, $defaut = null)
 {
     $config = Zend_Registry::get('config');
     $pathToPublicSkins = $config->design->pathToSkins;
     $skins = Digitalus_Filesystem_Dir::getDirectories($pathToPublicSkins);
     if ($defaut == NULL) {
         $defaut = $this->view->getTranslation('Select One');
     }
     $options[0] = $defaut;
     if (is_array($skins)) {
         foreach ($skins as $skin) {
             $options[$skin] = $skin;
         }
         return $this->view->formSelect($name, $value, $attr, $options);
     } else {
         return null;
     }
 }
开发者ID:ngukho,项目名称:ducbui-cms,代码行数:21,代码来源:SelectSkin.php

示例8: cryptoSelect

 /**
  * Generates a drop down box listing all crypto profiles
  *
  * @param  integer current crypto profile (or null if no current profile)
  * @param string element name
  * @return string
  */
 public function cryptoSelect($cryptoID, $name = 'cryptoID')
 {
     $options[0] = 'none';
     $cryptos = CryptoModel::getAllProfiles();
     foreach ($cryptos as $crypto) {
         $profileName = $this->view->h($crypto->name);
         if (!isset($options[$crypto->cryptoID])) {
             $options[$crypto->cryptoID] = $profileName;
         }
     }
     return $this->view->formSelect($name, $cryptoID, null, $options);
 }
开发者ID:humansky,项目名称:qframe,代码行数:19,代码来源:QuestionnairedataHelpers.php

示例9: instanceSelect

 /**
  * Generates a drop down box listing all instances that belong to the chosen instance
  *
  * @param  Array   list of all instances to which this user has access
  * @param  integer id of questionnaire that has been selected
  * @return string
  */
 public function instanceSelect($instances, $questionnaire, $name = 'instance', $instanceID = null)
 {
     if ($questionnaire === null) {
         $options[0] = 'Select a questionnaire';
     } else {
         $options[0] = ' ';
         foreach ($instances as $instance) {
             $questionnaireName = $this->view->h($instance->questionnaireName);
             $instanceName = $this->view->h($instance->instanceName);
             if ($instance->questionnaireID == $questionnaire) {
                 $options[$instance->instanceID] = $instanceName;
             }
         }
     }
     return $this->view->formSelect($name, $instanceID, null, $options);
 }
开发者ID:humansky,项目名称:qframe,代码行数:23,代码来源:RoleHelpers.php

示例10: selectDoctype

 /**
  *
  */
 public function selectDoctype($name, $value, $attr = null)
 {
     $data = array('XHTML1_TRANSITIONAL' => 'XHTML1_TRANSITIONAL', 'XHTML11' => 'XHTML11', 'XHTML1_STRICT' => 'XHTML1_STRICT', 'XHTML1_FRAMESET' => 'XHTML1_FRAMESET', 'XHTML_BASIC1' => 'XHTML_BASIC1', 'HTML4_STRICT' => 'HTML4_STRICT', 'HTML4_LOOSE' => 'HTML4_LOOSE', 'HTML4_FRAMESET' => 'HTML4_FRAMESET');
     return $this->view->formSelect($name, $value, $attr, $data);
 }
开发者ID:ngukho,项目名称:ducbui-cms,代码行数:8,代码来源:SelectDoctype.php

示例11: selectTimezone

 /**
  *
  */
 public function selectTimezone($name, $value, $attr = null)
 {
     $data = Digitalus_Validate_Timezone::getValidTimezones(null, true);
     return $this->view->formSelect($name, $value, $attr, $data);
 }
开发者ID:ngukho,项目名称:ducbui-cms,代码行数:8,代码来源:SelectTimezone.php

示例12: getHtml

 /**
  *
  * @param string $value
  * @param Zend_View_Interface $view
  * @return string
  */
 public static function getHtml($value, Zend_View_Interface $view = null)
 {
     return $view->formSelect('confValue', $value, null, Axis_Collect_Currency::collect());
 }
开发者ID:rguedes,项目名称:axiscommerce,代码行数:10,代码来源:BaseCurrency.php

示例13: _rowTask

    private function _rowTask(Zend_Db_Table_Row_Abstract $task, array $ratings, $func, $counter = null)
    {
        if ($func) {
            $table = 'functasks';
        } else {
            $table = 'tasks';
        }
        if (empty($task->id)) {
            $num = '*';
            $term = '';
            //(date('n') < 12 ? date('Y') : (date('Y') + 1)) . '-12-31';
            $note = '';
            $name = 'taskPattern';
            $class = 'row-pattern';
            $toggle = '<div class="toggle-cancel" onclick="Card.removeRow(this, \'' . $table . '\')">&nbsp;</div>';
            $weight = '0';
        } else {
            $all_notes = new Rp_Db_Table_Ach_Tasks_Notes();
            $kol = count($all_notes->fetchTaskNotes($task->id));
            $num = $counter;
            $term = '';
            $term_date = '';
            if ($task->date_term != null) {
                $term = $task->date_term;
                $term_date = date('d.m.y', strtotime($term));
            }
            $note = '<div style="display:none" onclick="openNotes(' . $task->id . ' , 0)" title="Заметки" style:>' . $kol . '</div>';
            $name = 'tasks[' . $task->id . ']';
            $weight = $task->weight;
            $class = '';
            $toggle = '';
            if ($task->status == '0') {
                $class = 'row-canceled';
            } elseif ($task->status > 0) {
                $class = 'row-approval';
            }
            if ($task->status != 2) {
                $toggle = '<div class="toggle-cancel" onclick="Card.toggleCancel(this, \'' . $table . '\')">&nbsp;</div>';
            }
        }
        return '
			<tr class="' . $class . '">
				<td class="tasks-field-num">
					<input name="' . $name . '[status]" type="hidden" value="' . $task->status . '" />
					<div>' . $num . '</div>' . $toggle . '
				</td>
				<td class="tasks-field-description">
					<textarea name="' . $name . '[description]" readonly="readonly">' . $task->description . '</textarea>
				</td>
				<td class="tasks-field-term">
					<input name="term_display" type="text" value="' . $term_date . '" readonly="readonly" />
					<input name="' . $name . '[date_term]" type="hidden" value="' . $term . '" />
				</td>
				<td class="tasks-field-weight">
					<textarea name="' . $name . '[weight]" readonly="readonly">' . $weight . '</textarea>
				</td>
				<td class="tasks-field-note">
					' . $note . '
					<input name="' . $name . '[is_functional]" type="hidden" value="' . $func . '" />
				</td>
				<td class="tasks-field-result">
					<textarea name="' . $name . '[result]" readonly="readonly">' . $task->result . '</textarea>
				</td>
				<td class="tasks-field-rating">
					' . $this->view->formSelect($name . '[rating_id]', $task->rating_id, null, $ratings) . '
					<div>' . $ratings[$task->rating_id] . '</div>
				</td>
			</tr>
		';
    }
开发者ID:ROLF-IT-Department,项目名称:rolf-personnel,代码行数:70,代码来源:AchievsFormTasks.php


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