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


PHP flexicontent_html::buildstateslist方法代码示例

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


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

示例1: display


//.........这里部分代码省略.........
        			$_dataCol_wrongSize = false;
        		}*/
        if ($_dataCol_wrongSize) {
            $app->enqueueMessage("Joomla DB table: <b>'session'</b> has a <b>'data'</b> column with type: <b>'" . $_dataColType . "'</b>, instead of expected type <b>'mediumtext'</b>. Trying to import large data files may fail", "notice");
        }
        $formvals = array();
        // Retrieve Basic configuration
        $formvals['type_id'] = $model->getState('type_id');
        $formvals['language'] = $model->getState('language');
        $formvals['state'] = $model->getState('state');
        $formvals['access'] = $model->getState('access');
        // Main and secondary categories, tags
        $formvals['maincat'] = $model->getState('maincat');
        $formvals['maincat_col'] = $model->getState('maincat_col');
        $formvals['seccats'] = $model->getState('seccats');
        $formvals['seccats_col'] = $model->getState('seccats_col');
        $formvals['tags_col'] = $model->getState('tags_col');
        // Publication: Author/modifier
        $formvals['created_by_col'] = $model->getState('created_by_col');
        $formvals['modified_by_col'] = $model->getState('modified_by_col');
        // Publication: META data
        $formvals['metadesc_col'] = $model->getState('metadesc_col');
        $formvals['metakey_col'] = $model->getState('metakey_col');
        // Publication: dates
        $formvals['modified_col'] = $model->getState('modified_col');
        $formvals['created_col'] = $model->getState('modified_col');
        $formvals['publish_up_col'] = $model->getState('publish_up_col');
        $formvals['publish_down_col'] = $model->getState('publish_down_col');
        // Advanced configuration
        $formvals['ignore_unused_cols'] = $model->getState('ignore_unused_cols');
        $formvals['id_col'] = $model->getState('id_col');
        $formvals['items_per_step'] = $model->getState('items_per_step');
        // CSV file format
        $formvals['mval_separator'] = $model->getState('mval_separator');
        $formvals['mprop_separator'] = $model->getState('mprop_separator');
        $formvals['field_separator'] = $model->getState('field_separator');
        $formvals['enclosure_char'] = $model->getState('enclosure_char');
        $formvals['record_separator'] = $model->getState('record_separator');
        $formvals['debug_records'] = $model->getState('debug_records');
        // ******************
        // Create form fields
        // ******************
        $lists['type_id'] = flexicontent_html::buildtypesselect($types, 'type_id', $formvals['type_id'], true, 'class="required use_select2_lib"', 'type_id');
        $actions_allowed = array('core.create');
        // Creating categorories tree for item assignment, we use the 'create' privelege
        // build the main category select list
        $attribs = 'class="use_select2_lib required"';
        $fieldname = 'maincat';
        $lists['maincat'] = flexicontent_cats::buildcatselect($categories, $fieldname, $formvals['maincat'], 2, $attribs, false, true, $actions_allowed);
        // build the secondary categories select list
        $class = "use_select2_lib";
        $attribs = 'multiple="multiple" size="10" class="' . $class . '"';
        $fieldname = 'seccats[]';
        $lists['seccats'] = flexicontent_cats::buildcatselect($categories, $fieldname, $formvals['seccats'], false, $attribs, false, true, $actions_allowed, $require_all = true);
        // build languages list
        // Retrieve author configuration
        $authorparams = flexicontent_db::getUserConfig($user->id);
        $allowed_langs = $authorparams->get('langs_allowed', null);
        $allowed_langs = !$allowed_langs ? null : FLEXIUtilities::paramToArray($allowed_langs);
        // We will not use the default getInput() function of J1.6+ since we want to create a radio selection field with flags
        // we could also create a new class and override getInput() method but maybe this is an overkill, we may do it in the future
        $lists['languages'] = flexicontent_html::buildlanguageslist('language', ' style="vertical-align:top;" onchange="var m=jQuery(\'#fc_import_about_langcol\'); this.value ? m.hide(600) : m.show(600);"', $formvals['language'], 6, $allowed_langs, $published_only = true, $disable_langs = null, $add_all = true, $conf = array('required' => true)) . '
			<span class="fc-mssg-inline fc-note fc-nobgimage" id="fc_import_about_langcol" style="display:none;">
				' . JText::_('FLEXI_USE_LANGUAGE_COLUMN_TIP') . '
			</span>';
        $lists['states'] = flexicontent_html::buildstateslist('state', ' style="vertical-align:top;" onchange="var m=jQuery(\'#fc_import_about_statecol\'); this.value ? m.hide(600) : m.show(600);"', $formvals['state'], 2) . '<span class="fc-mssg-inline fc-note fc-nobgimage" id="fc_import_about_statecol" style="display:none;">
				' . JText::_('FLEXI_USE_STATE_COLUMN_TIP') . '
			</span>';
        // build access level filter
        $access_levels = JHtml::_('access.assetgroups');
        array_unshift($access_levels, JHtml::_('select.option', '0', "Use 'access' column"));
        array_unshift($access_levels, JHtml::_('select.option', '', 'FLEXI_SELECT_ACCESS_LEVEL'));
        $fieldname = 'access';
        // make multivalue
        $elementid = 'access';
        $attribs = 'class="required use_select2_lib"';
        $lists['access'] = JHTML::_('select.genericlist', $access_levels, $fieldname, $attribs, 'value', 'text', $formvals['access'], $elementid, $translate = true);
        // Ignore warnings because component may not be installed
        $warnHandlers = JERROR::getErrorHandling(E_WARNING);
        JERROR::setErrorHandling(E_WARNING, 'ignore');
        // Reset the warning handler(s)
        foreach ($warnHandlers as $mode) {
            JERROR::setErrorHandling(E_WARNING, $mode);
        }
        // ********************************************************************************
        // Get field names (from the header line (row 0), and remove it form the data array
        // ********************************************************************************
        $file_field_types_list = '"image","file"';
        $q = 'SELECT id, name, label, field_type FROM #__flexicontent_fields AS fi' . ' WHERE fi.field_type IN (' . $file_field_types_list . ')';
        $db->setQuery($q);
        $file_fields = $db->loadObjectList('name');
        //assign data to template
        $this->assignRef('model', $model);
        $this->assignRef('lists', $lists);
        $this->assignRef('user', $user);
        $this->assignRef('cparams', $cparams);
        $this->assignRef('file_fields', $file_fields);
        $this->assignRef('formvals', $formvals);
        parent::display($tpl);
    }
开发者ID:khetsothea,项目名称:flexicontent-cck,代码行数:101,代码来源:view.html.php

示例2: _displayCopyMove

 function _displayCopyMove($tpl = null, $cid = array(), $behaviour = 'copy/move')
 {
     global $globalcats;
     $app = JFactory::getApplication();
     // Initialise variables
     $user = JFactory::getUser();
     $document = JFactory::getDocument();
     // Add css to document
     $document->addStyleSheetVersion(JURI::base(true) . '/components/com_flexicontent/assets/css/flexicontentbackend.css', FLEXI_VERSION);
     $document->addStyleSheetVersion(JURI::base(true) . '/components/com_flexicontent/assets/css/j3x.css', FLEXI_VERSION);
     // Add js to document
     JHTML::_('behavior.tooltip');
     flexicontent_html::loadFramework('select2');
     $document->addScriptVersion(JURI::base(true) . '/components/com_flexicontent/assets/js/copymove.js', FLEXI_VERSION);
     // Add js function to overload the joomla submitform validation
     JHTML::_('behavior.formvalidation');
     // load default validation JS to make sure it is overriden
     $document->addScriptVersion(JURI::root(true) . '/components/com_flexicontent/assets/js/admin.js', FLEXI_VERSION);
     $document->addScriptVersion(JURI::root(true) . '/components/com_flexicontent/assets/js/validate.js', FLEXI_VERSION);
     // Create document/toolbar titles
     if ($behaviour == 'translate') {
         $doc_title = JText::_('FLEXI_TRANSLATE_ITEM');
     } else {
         $doc_title = JText::_('FLEXI_BATCH');
     }
     $site_title = $document->getTitle();
     JToolBarHelper::title($doc_title, 'itemadd');
     $document->setTitle($doc_title . ' - ' . $site_title);
     // Create the toolbar
     JToolBarHelper::save('items.copymove');
     JToolBarHelper::cancel('items.cancel');
     //Get data from the model
     $rows = $this->get('Data');
     $itemCats = $this->get('ItemCats');
     $categories = $globalcats;
     // build the main category select list
     $lists['maincat'] = flexicontent_cats::buildcatselect($categories, 'maincat', '', JText::_('FLEXI_DO_NOT_CHANGE'), 'class="use_select2_lib" size="10"', false, false);
     // build the secondary categories select list
     $lists['seccats'] = flexicontent_cats::buildcatselect($categories, 'seccats[]', '', 0, 'class="use_select2_lib" multiple="multiple" size="10"', false, false);
     // build language selection
     $lists['language'] = flexicontent_html::buildlanguageslist('language', '', '', $type = $behaviour != 'translate' ? JText::_('FLEXI_NOCHANGE_LANGUAGE') : 7, $allowed_langs = null, $published_only = true, $disable_langs = null, $add_all = true, array('required' => 1));
     // build state selection
     $selected_state = 0;
     // use unpublished as default state of new items, (instead of '' which means do not change)
     $lists['state'] = flexicontent_html::buildstateslist('state', 'class="use_select2_lib"', $selected_state);
     // build types selection
     $types = flexicontent_html::getTypesList();
     $lists['type_id'] = flexicontent_html::buildtypesselect($types, 'type_id', '', JText::_('FLEXI_DO_NOT_CHANGE'), 'class="use_select2_lib" size="1" style="vertical-align:top;"', 'type_id');
     // build access level filter
     $levels = JHtml::_('access.assetgroups');
     array_unshift($levels, JHtml::_('select.option', '', 'FLEXI_DO_NOT_CHANGE'));
     $fieldname = $elementid = 'access';
     $attribs = 'class="use_select2_lib"';
     $lists['access'] = JHTML::_('select.genericlist', $levels, $fieldname, $attribs, 'value', 'text', $value = '', $elementid, $translate = true);
     //assign data to template
     $this->assignRef('lists', $lists);
     $this->assignRef('rows', $rows);
     $this->assignRef('itemCats', $itemCats);
     $this->assignRef('cid', $cid);
     $this->assignRef('user', $user);
     $this->assignRef('behaviour', $behaviour);
     parent::display($tpl);
 }
开发者ID:nettdotkomm,项目名称:flexicontent-cck,代码行数:63,代码来源:view.html.php

示例3:

							<?php 
    echo flexicontent_html::buildlanguageslist('language', '', $this->rows[0]->lang, $type = $copy_behaviour != 'translate' ? 5 : 4);
    ?>
						</td>
					</tr>
					<?php 
}
?>
					<tr valign="top">
						<td class="key"><label class="fckey"><?php 
echo JText::_('FLEXI_STATE');
?>
</label></td>
						<td>
							<?php 
echo flexicontent_html::buildstateslist('state', '', '');
?>
						</td>
					</tr>
				</table>
			</fieldset>
			</td>
			<td valign="top" width="33%">
			<fieldset>
			<legend><?php 
echo JText::_('FLEXI_COPY_MOVE_DESTINATION');
?>
</legend>
				<table>
					<tr valign="top">
						<td class="key"><label class="fckey"><?php 
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:31,代码来源:copy.php

示例4: display


//.........这里部分代码省略.........
     if (!empty($conf) && $task == 'processcsv') {
         $this->assignRef('conf', $conf);
         parent::display('process');
         return;
     }
     // Get types
     $query = 'SELECT id, name' . ' FROM #__flexicontent_types' . ' WHERE published = 1' . ' ORDER BY name ASC';
     $db->setQuery($query);
     $types = $db->loadObjectList('id');
     // Get Languages
     $languages = FLEXI_FISH || FLEXI_J16GE ? FLEXIUtilities::getLanguages('code') : array();
     // Get categories
     global $globalcats;
     $categories = $globalcats;
     if (!empty($conf)) {
         $this->assignRef('conf', $conf);
         $this->assignRef('cparams', $cparams);
         $this->assignRef('types', $types);
         $this->assignRef('languages', $languages);
         $this->assignRef('categories', $globalcats);
         parent::display('list');
         return;
     }
     // ******************
     // Create form fields
     // ******************
     $lists['type_id'] = flexicontent_html::buildtypesselect($types, 'type_id', '', true, 'class="fcfield_selectval" size="1"', 'type_id');
     $actions_allowed = array('core.create');
     // Creating categorories tree for item assignment, we use the 'create' privelege
     // build the secondary categories select list
     $class = "fcfield_selectmulval";
     $attribs = 'multiple="multiple" size="10" class="' . $class . '"';
     $fieldname = FLEXI_J16GE ? 'seccats[]' : 'seccats[]';
     $lists['seccats'] = flexicontent_cats::buildcatselect($categories, $fieldname, '', false, $attribs, false, true, $actions_allowed, $require_all = true);
     // build the main category select list
     $attribs = 'class="fcfield_selectval"';
     $fieldname = FLEXI_J16GE ? 'maincat' : 'maincat';
     $lists['maincat'] = flexicontent_cats::buildcatselect($categories, $fieldname, '', 2, $attribs, false, true, $actions_allowed);
     /*
     	// build the main category select list
     	$lists['maincat'] = flexicontent_cats::buildcatselect($categories, 'maincat', '', 0, 'class="inputbox" size="10"', false, false);
     	// build the secondary categories select list
     	$lists['seccats'] = flexicontent_cats::buildcatselect($categories, 'seccats[]', '', 0, 'class="inputbox" multiple="multiple" size="10"', false, false);
     */
     //build languages list
     // Retrieve author configuration
     $db->setQuery('SELECT author_basicparams FROM #__flexicontent_authors_ext WHERE user_id = ' . $user->id);
     if ($authorparams = $db->loadResult()) {
         $authorparams = FLEXI_J16GE ? new JRegistry($authorparams) : new JParameter($authorparams);
     }
     $allowed_langs = !$authorparams ? null : $authorparams->get('langs_allowed', null);
     $allowed_langs = !$allowed_langs ? null : FLEXIUtilities::paramToArray($allowed_langs);
     // We will not use the default getInput() function of J1.6+ since we want to create a radio selection field with flags
     // we could also create a new class and override getInput() method but maybe this is an overkill, we may do it in the future
     if (FLEXI_FISH || FLEXI_J16GE) {
         $default_lang = $cparams->get('import_lang', '*');
         $lists['languages'] = flexicontent_html::buildlanguageslist('language', '', $default_lang, 6, $allowed_langs, $published_only = true);
     } else {
         $default_lang = flexicontent_html::getSiteDefaultLang();
         $_langs[] = JHTML::_('select.option', $default_lang, JText::_('Default') . ' (' . flexicontent_html::getSiteDefaultLang() . ')');
         $lists['languages'] = JHTML::_('select.radiolist', $_langs, 'language', $class = '', 'value', 'text', $default_lang);
     }
     $default_state = $cparams->get('import_state', 1);
     $lists['states'] = flexicontent_html::buildstateslist('state', '', $default_state, 2);
     // Ignore warnings because component may not be installed
     $warnHandlers = JERROR::getErrorHandling(E_WARNING);
     JERROR::setErrorHandling(E_WARNING, 'ignore');
     if (FLEXI_J30GE) {
         // J3.0+ adds an warning about component not installed, commented out ... till time ...
         $fleximport_comp_enabled = false;
         //JComponentHelper::isEnabled('com_fleximport');
     } else {
         $fleximport_comp = JComponentHelper::getComponent('com_fleximport', true);
         $fleximport_comp_enabled = $fleximport_comp && $fleximport_comp->enabled;
     }
     // Reset the warning handler(s)
     foreach ($warnHandlers as $mode) {
         JERROR::setErrorHandling(E_WARNING, $mode);
     }
     if ($fleximport_comp_enabled) {
         $fleximport = JText::sprintf('FLEXI_FLEXIMPORT_INSTALLED', JText::_('FLEXI_FLEXIMPORT_INFOS'));
     } else {
         $fleximport = JText::sprintf('FLEXI_FLEXIMPORT_NOT_INSTALLED', JText::_('FLEXI_FLEXIMPORT_INFOS'));
     }
     // ********************************************************************************
     // Get field names (from the header line (row 0), and remove it form the data array
     // ********************************************************************************
     $file_field_types_list = '"image","file"';
     $q = 'SELECT id, name, label, field_type FROM #__flexicontent_fields AS fi' . ' WHERE fi.field_type IN (' . $file_field_types_list . ')';
     $db->setQuery($q);
     $file_fields = $db->loadObjectList('name');
     //assign data to template
     $this->assignRef('lists', $lists);
     $this->assignRef('cid', $cid);
     $this->assignRef('user', $user);
     $this->assignRef('fleximport', $fleximport);
     $this->assignRef('cparams', $cparams);
     $this->assignRef('file_fields', $file_fields);
     parent::display($tpl);
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:101,代码来源:view.html.php


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