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


PHP K2HelperHTML::state方法代码示例

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


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

示例1: setFormFields

 protected function setFormFields(&$form, $row)
 {
     $form->state = K2HelperHTML::state('state', $row->state, false, false, 'radio', true);
     $form->group = K2HelperHTML::extraFieldsGroups('group', $row->group);
     $form->type = K2HelperHTML::extraFieldsTypes('type', $row->type, 'K2_SELECT_TYPE');
     $definitions = K2HelperExtraFields::getDefinitions();
     if ($row->id) {
         $definitions[$row->type] = $row->getDefinition();
     }
     $form->definitions = $definitions;
 }
开发者ID:sofian86,项目名称:k2-v3-dev-build,代码行数:11,代码来源:view.json.php

示例2: setFormFields

 protected function setFormFields(&$form, $row)
 {
     $form->state = K2HelperHTML::state('state', $row->state, false, true, 'radio', true);
     $form->language = K2HelperHTML::language('language', $row->language);
     $form->access = JHtml::_('access.level', 'access', $row->access, '', false);
     $form->parent = K2HelperHTML::categories('parent_id', $row->parent_id, 'K2_NONE', $row->id);
     $form->inheritance = K2HelperHTML::categories('inheritance', $row->inheritance, 'K2_NONE', $row->id, '', false, 'id', true);
     $form->template = K2HelperHTML::template('template', $row->template);
     require_once JPATH_ADMINISTRATOR . '/components/com_k2/classes/editor.php';
     $config = JFactory::getConfig();
     $editor = K2Editor::getInstance($config->get('editor'));
     $form->description = $editor->display('description', $row->description, '100%', '300', '40', '5');
     require_once JPATH_ADMINISTRATOR . '/components/com_k2/helpers/extrafields.php';
     $form->extraFields = K2HelperExtraFields::getCategoryExtraFieldsGroups($row->extra_fields);
     // Associations
     $associations = new stdClass();
     $associations->enabled = JLanguageAssociations::isEnabled();
     $associations->languages = array();
     if ($associations->enabled) {
         $languages = JLanguageHelper::getLanguages('lang_code');
         foreach ($languages as $tag => $language) {
             if (empty($row->language) || $tag != $row->language) {
                 $lang = new stdClass();
                 $lang->title = $language->title;
                 $lang->code = $language->lang_code;
                 $lang->associated = new stdClass();
                 $lang->associated->title = '';
                 $lang->associated->id = '';
                 if (isset($row->associations) && is_array($row->associations) && isset($row->associations[$language->lang_code])) {
                     $associated = $row->associations[$language->lang_code];
                     $lang->associated->title = $associated->title;
                     $lang->associated->id = (int) $associated->id;
                 }
                 $associations->languages[] = $lang;
             }
         }
     }
     $form->associations = $associations;
 }
开发者ID:Naldo100,项目名称:k2-v3-dev-build,代码行数:39,代码来源:view.json.php


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