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


PHP flexicontent_html::getTypesList方法代码示例

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


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

示例1: getTypeslist

 /**
  * Method to get types list
  * 
  * @return array
  * @since 1.5
  */
 function getTypeslist($type_ids = false, $check_perms = false, $published = false)
 {
     return flexicontent_html::getTypesList($type_ids, $check_perms, $published);
 }
开发者ID:nettdotkomm,项目名称:flexicontent-cck,代码行数:10,代码来源:fields.php

示例2: display

    function display($tpl = null)
    {
        // ********************
        // Initialise variables
        // ********************
        $app = JFactory::getApplication();
        $jinput = $app->input;
        $option = $jinput->get('option', '', 'cmd');
        $view = $jinput->get('view', '', 'cmd');
        $task = $jinput->get('task', '', 'cmd');
        $cparams = JComponentHelper::getParams('com_flexicontent');
        $user = JFactory::getUser();
        $db = JFactory::getDBO();
        $document = JFactory::getDocument();
        $session = JFactory::getSession();
        // Get model
        $model = $this->getModel();
        // Some flags
        $has_zlib = function_exists("zlib_encode");
        //version_compare(PHP_VERSION, '5.4.0', '>=');
        // Get session information
        $conf = $session->get('csvimport_config', "", 'flexicontent');
        $conf = unserialize($conf ? $has_zlib ? zlib_decode(base64_decode($conf)) : base64_decode($conf) : "");
        $lineno = $session->get('csvimport_lineno', 999999, 'flexicontent');
        $session->set('csvimport_parse_log', null, 'flexicontent');
        // This is the flag if CSV file has been parsed (import form already submitted), thus to display the imported data
        // **************************
        // Add css and js to document
        // **************************
        $document->addStyleSheetVersion(JURI::base(true) . '/components/com_flexicontent/assets/css/flexicontentbackend.css', FLEXI_VHASH);
        $document->addStyleSheetVersion(JURI::base(true) . '/components/com_flexicontent/assets/css/j3x.css', FLEXI_VHASH);
        // Add JS frameworks
        flexicontent_html::loadFramework('select2');
        $prettycheckable_added = flexicontent_html::loadFramework('prettyCheckable');
        flexicontent_html::loadFramework('flexi-lib');
        // 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_VHASH);
        $document->addScriptVersion(JURI::root(true) . '/components/com_flexicontent/assets/js/validate.js', FLEXI_VHASH);
        // *****************************
        // Get user's global permissions
        // *****************************
        $perms = FlexicontentHelperPerm::getPerm();
        // ************************
        // Create Submenu & Toolbar
        // ************************
        // Create Submenu (and also check access to current view)
        FLEXISubmenu('CanImport');
        // Create document/toolbar titles
        $doc_title = JText::_('FLEXI_IMPORT');
        $site_title = $document->getTitle();
        JToolBarHelper::title($doc_title, 'import');
        $document->setTitle($doc_title . ' - ' . $site_title);
        // Create the toolbar
        $toolbar = JToolBar::getInstance('toolbar');
        if (!empty($conf)) {
            if ($task != 'processcsv') {
                $ctrl_task = 'import.processcsv';
                $import_btn_title = empty($lineno) ? 'FLEXI_IMPORT_START_TASK' : 'FLEXI_IMPORT_CONTINUE_TASK';
                JToolBarHelper::custom($ctrl_task, 'save.png', 'save.png', $import_btn_title, $list_check = false);
            }
            $ctrl_task = 'import.clearcsv';
            JToolBarHelper::custom($ctrl_task, 'cancel.png', 'cancel.png', 'FLEXI_IMPORT_CLEAR_TASK', $list_check = false);
        } else {
            $ctrl_task = 'import.initcsv';
            JToolBarHelper::custom($ctrl_task, 'import.png', 'import.png', 'FLEXI_IMPORT_PREPARE_TASK', $list_check = false);
            $ctrl_task = 'import.testcsv';
            JToolBarHelper::custom($ctrl_task, 'test.png', 'test.png', 'FLEXI_IMPORT_TEST_FILE_FORMAT', $list_check = false);
        }
        //JToolBarHelper::Back();
        if ($perms->CanConfig) {
            JToolBarHelper::divider();
            JToolBarHelper::spacer();
            $session = JFactory::getSession();
            $fc_screen_width = (int) $session->get('fc_screen_width', 0, 'flexicontent');
            $_width = $fc_screen_width && $fc_screen_width - 84 > 940 ? $fc_screen_width - 84 > 1400 ? 1400 : $fc_screen_width - 84 : 940;
            $fc_screen_height = (int) $session->get('fc_screen_height', 0, 'flexicontent');
            $_height = $fc_screen_height && $fc_screen_height - 128 > 550 ? $fc_screen_height - 128 > 1000 ? 1000 : $fc_screen_height - 128 : 550;
            JToolBarHelper::preferences('com_flexicontent', $_height, $_width, 'Configuration');
        }
        // Get types
        $types = flexicontent_html::getTypesList($_type_ids = false, $_check_perms = false, $_published = true);
        // Get Languages
        $languages = FLEXIUtilities::getLanguages('code');
        // Get categories
        global $globalcats;
        $categories = $globalcats;
        // ************************************
        // Decide layout to load: 'import*.php'
        // ************************************
        $this->setLayout('import');
        $this->sidebar = FLEXI_J30GE ? JHtmlSidebar::render() : null;
        // Execute the import task, load the log-like AJAX-based layout (import_process.php), to display results including any warnings
        if (!empty($conf) && $task == 'processcsv') {
            $this->assignRef('conf', $conf);
            parent::display('process');
            return;
        } else {
            if (!empty($conf)) {
//.........这里部分代码省略.........
开发者ID:khetsothea,项目名称:flexicontent-cck,代码行数:101,代码来源:view.html.php

示例3: _createPlacementConf

 function _createPlacementConf(&$item, &$fields)
 {
     $params =& $item->parameters;
     // 1. Find core placer fields (of type 'coreprops')
     $core_placers = array();
     foreach ($fields as $field) {
         if ($field->field_type == 'coreprops') {
             $core_placers[$field->parameters->get('props_type')] = $field;
         }
     }
     // 2. Field name arrays:  (a) placeable and  (b) placeable via placer  (c) above tabs fields
     $via_core_field = array('title' => 1, 'type_id' => 1, 'state' => 1, 'cats' => 1, 'tags' => 1, 'text' => 1);
     $via_core_field = array_merge($via_core_field, array('created' => 1, 'created_by' => 1, 'modified' => 1, 'modified_by' => 1));
     $via_core_prop = array('alias' => 1, 'disable_comments' => 1, 'notify_subscribers' => 1, 'language' => 1, 'perms' => 1, 'metadata' => 1, 'seoconf' => 1, 'display_params' => 1, 'layout_selection' => 1, 'layout_params' => 1);
     $via_core_prop = array_merge($via_core_prop, array('timezone_info' => 1, 'created_by_alias' => 1, 'publish_up' => 1, 'publish_down' => 1, 'access' => 1));
     $placeable_fields = array_merge($via_core_field, $via_core_prop);
     // 3. Decide placement of CORE properties / fields
     $tab_fields['above'] = $params->get('form_tabs_above', 'title, alias, category, lang, type, state, disable_comments, notify_subscribers');
     $tab_fields['tab01'] = $params->get('form_tab01_fields', 'text');
     $tab_fields['tab02'] = $params->get('form_tab02_fields', 'fields_manager');
     $tab_fields['tab03'] = $params->get('form_tab03_fields', 'categories, tags, language, perms');
     $tab_fields['tab04'] = $params->get('form_tab04_fields', 'timezone_info, created, createdby, created_by_alias, publish_up, publish_down, access');
     $tab_fields['tab05'] = $params->get('form_tab05_fields', 'metadata, seoconf');
     $tab_fields['tab06'] = $params->get('form_tab06_fields', 'display_params');
     $tab_fields['tab07'] = $params->get('form_tab07_fields', 'layout_selection, layout_params');
     $tab_fields['fman'] = $params->get('form_tabs_fieldsman', '');
     $tab_fields['below'] = $params->get('form_tabs_below', '');
     // Fix aliases, also replacing field types with field names
     foreach ($tab_fields as $tab_name => $field_list) {
         $field_list = str_replace('createdby', 'created_by', $field_list);
         $field_list = str_replace('modifiedby', 'modified_by', $field_list);
         $field_list = str_replace('createdby_alias', 'created_by_alias', $field_list);
         $field_list = str_replace('maintext', 'text', $field_list);
         $tab_fields[$tab_name] = $field_list;
     }
     //echo "<pre>"; print_r($tab_fields); echo "</pre>";
     // Split field lists
     $all_tab_fields = array();
     foreach ($tab_fields as $i => $field_list) {
         // Split field names and flip the created sub-array to make field names be the indexes of the sub-array
         $tab_fields[$i] = empty($tab_fields[$i]) || $tab_fields[$i] == '_skip_' ? array() : array_flip(preg_split("/[\\s]*,[\\s]*/", $field_list));
         // Find all field names of the placed fields, we can use this to find non-placed fields
         foreach ($tab_fields[$i] as $field_name => $ignore) {
             $all_tab_fields[$field_name] = 1;
         }
     }
     // Find fields missing from configuration, and place them below the tabs
     foreach ($placeable_fields as $fn => $i) {
         if (!isset($all_tab_fields[$fn])) {
             $tab_fields['below'][$fn] = 1;
         }
     }
     // get TAB titles and TAB icon classes
     $_tmp = $params->get('form_tab_titles', '1:FLEXI_DESCRIPTION, 2:__TYPE_NAME__, 3:FLEXI_ASSIGNMENTS, 4:FLEXI_PUBLISHING, 5:FLEXI_META_SEO, 6:FLEXI_DISPLAYING, 7:FLEXI_TEMPLATE');
     $_ico = $params->get('form_tab_icons', '1:icon-file-2, 2:icon-signup, 3:icon-tree-2, 4:icon-calendar, 5:icon-bookmark, 6:icon-eye-open, 7:icon-palette');
     // Create title of the custom fields default TAB (field manager TAB)
     if ($item->type_id) {
         $_str = JText::_('FLEXI_DETAILS');
         $_str = mb_strtoupper(mb_substr($_str, 0, 1, 'UTF-8')) . mb_substr($_str, 1, NULL, 'UTF-8');
         $types_arr = flexicontent_html::getTypesList();
         $type_lbl = isset($types_arr[$item->type_id]) ? $types_arr[$item->type_id]->name : '';
         $type_lbl = $type_lbl ? JText::_($type_lbl) : JText::_('FLEXI_CONTENT_TYPE');
         $type_lbl = $type_lbl . ' (' . $_str . ')';
     } else {
         $type_lbl = JText::_('FLEXI_TYPE_NOT_DEFINED');
     }
     // Split titles of default tabs and language filter the titles
     $_tmp = preg_split("/[\\s]*,[\\s]*/", $_tmp);
     $tab_titles = array();
     foreach ($_tmp as $_data) {
         list($tab_no, $tab_title) = preg_split("/[\\s]*:[\\s]*/", $_data);
         if ($tab_title == '__TYPE_NAME__') {
             $tab_titles['tab0' . $tab_no] = $type_lbl;
         } else {
             $tab_titles['tab0' . $tab_no] = JText::_($tab_title);
         }
     }
     // Split icon classes of default tabs
     $_ico = preg_split("/[\\s]*,[\\s]*/", $_ico);
     $tab_icocss = array();
     foreach ($_ico as $_data) {
         list($tab_no, $tab_icon_class) = preg_split("/[\\s]*:[\\s]*/", $_data);
         $tab_icocss['tab0' . $tab_no] = $tab_icon_class;
     }
     // 4. find if some fields are missing placement field
     $coreprop_missing = array();
     foreach ($via_core_prop as $fn => $i) {
         // -EITHER- configured to be shown at default position -OR-
         if (isset($tab_fields['fman'][$fn]) && !isset($core_placers[$fn])) {
             $coreprop_missing[$fn] = true;
             unset($tab_fields['fman'][$fn]);
             $tab_fields['below'][$fn] = 1;
         }
     }
     $placementConf['via_core_field'] = $via_core_field;
     $placementConf['via_core_prop'] = $via_core_prop;
     $placementConf['placeable_fields'] = $placeable_fields;
     $placementConf['tab_fields'] = $tab_fields;
     $placementConf['tab_titles'] = $tab_titles;
     $placementConf['tab_icocss'] = $tab_icocss;
//.........这里部分代码省略.........
开发者ID:benediktharter,项目名称:flexicontent-cck,代码行数:101,代码来源:view.html.php

示例4: display

    function display($tpl = null)
    {
        $fc_css = JURI::base(true) . '/components/com_flexicontent/assets/css/j3x.css';
        echo '
		<link rel="stylesheet" href="' . JURI::base(true) . '/components/com_flexicontent/assets/css/flexicontentbackend.css?' . FLEXI_VHASH . '" />
		<link rel="stylesheet" href="' . $fc_css . '?' . FLEXI_VHASH . '" />
		<link rel="stylesheet" href="' . JURI::root(true) . '/media/jui/css/bootstrap.min.css" />
		';
        $user = JFactory::getUser();
        // Get types
        $types = flexicontent_html::getTypesList($_type_ids = false, $_check_perms = false, $_published = true);
        $types = is_array($types) ? $types : array();
        $ctrl_task = FLEXI_J16GE ? 'items.add' : 'add';
        $icon = "components/com_flexicontent/assets/images/layout_add.png";
        $btn_class = FLEXI_J30GE ? ' btn btn-small' : ' fc_button fcsimple fcsmall';
        echo '
<div id="flexicontent">
	<table class="fc-table-list">
		<tr>
			<th>' . JText::_('FLEXI_SELECT_TYPE') . '</th>
		</tr>
		<tr>
			<td>
		';
        $link = "index.php?option=com_flexicontent&amp;controller=items&amp;task=" . $ctrl_task . "&amp;" . (FLEXI_J30GE ? JSession::getFormToken() : JUtility::getToken()) . "=1";
        $_name = '- ' . JText::_("FLEXI_ANY") . ' -';
        //.' ... '. JText::_("FLEXI_TYPE");
        ?>
			<a class="<?php 
        echo $btn_class;
        ?>
 btn-info" href="<?php 
        echo $link;
        ?>
" style="min-width:60px;" target="_parent">
				<!--<img style="margin-bottom:-3px;" src="<?php 
        echo $icon;
        ?>
" width="16" height="16" border="0" alt="<?php 
        echo $_name;
        ?>
" />&nbsp;-->
				<?php 
        echo $_name;
        ?>
			</a>
		<?php 
        foreach ($types as $type) {
            $allowed = !$type->itemscreatable || $user->authorise('core.create', 'com_flexicontent.type.' . $type->id);
            if (!$allowed && $type->itemscreatable == 1) {
                continue;
            }
            $link = "index.php?option=com_flexicontent&amp;controller=items&amp;task=" . $ctrl_task . "&amp;typeid=" . $type->id . "&amp;" . (FLEXI_J30GE ? JSession::getFormToken() : JUtility::getToken()) . "=1";
            if (!$allowed && $type->itemscreatable == 2) {
                ?>
				<span class="badge badge-warning">
					<!--<img style="margin-bottom:-3px;" src="<?php 
                echo $icon;
                ?>
" width="16" height="16" border="0" alt="<?php 
                echo $type->name;
                ?>
" />&nbsp;-->
					<?php 
                echo $type->name;
                ?>
				</span>
				<?php 
            } else {
                ?>
				<a class="<?php 
                echo $btn_class;
                ?>
 btn-success" href="<?php 
                echo $link;
                ?>
" target="_parent">
					<!--<img style="margin-bottom:-3px;" src="<?php 
                echo $icon;
                ?>
" width="16" height="16" border="0" alt="<?php 
                echo $type->name;
                ?>
" />&nbsp;-->
					<?php 
                echo $type->name;
                ?>
				</a>
			<?php 
            }
        }
        echo '
			</td>
		</tr>
	</table>
</div>
		';
    }
开发者ID:khetsothea,项目名称:flexicontent-cck,代码行数:98,代码来源:view.raw.php

示例5: _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

示例6: getTypesFromFilter

 /**
  * Method to get attributes and other data of types in types filter
  * 
  * @return array
  * @since 1.5
  */
 function getTypesFromFilter()
 {
     static $types = null;
     if ($types !== null) {
         return $types;
     }
     $filter_type = $this->getState('filter_type');
     JArrayHelper::toInteger($filter_type, null);
     if (empty($filter_type)) {
         return array();
     }
     // Get the extra fields from COMPONENT OR per type if TYPE FILTER is active
     $types = flexicontent_html::getTypesList($filter_type, $check_perms = false, $published = false);
     foreach ($types as $type_id => $type) {
         $types[$type_id]->params = new JRegistry($type->attribs);
     }
     return $types;
 }
开发者ID:nettdotkomm,项目名称:flexicontent-cck,代码行数:24,代码来源:items.php

示例7: _createPlacementConf

 function _createPlacementConf(&$fields, &$params, &$item)
 {
     // 1. Find core placer fields (of type 'coreprops')
     $core_placers = array();
     foreach ($fields as $field) {
         if ($field->field_type == 'coreprops') {
             $core_placers[$field->parameters->get('props_type')] = $field;
         }
     }
     // 2. Field name arrays:  (a) placeable and  (b) placeable via placer  (c) above tabs fields
     $via_core_field = array('title' => 1, 'type_id' => 1, 'state' => 1, 'cats' => 1, 'tags' => 1, 'maintext' => 1);
     $via_core_field = array_merge($via_core_field, FLEXI_J16GE ? array('created' => 1, 'created_by' => 1, 'modified' => 1, 'modified_by' => 1) : array());
     $via_core_prop = array('alias' => 1, 'disable_comments' => 1, 'notify_subscribers' => 1, 'language' => 1, 'perms' => 1, 'metadata' => 1, 'seoconf' => 1, 'display_params' => 1, 'layout_selection' => 1, 'layout_params' => 1);
     $via_core_prop = array_merge($via_core_prop, FLEXI_J16GE ? array('timezone_info' => 1, 'created_by_alias' => 1, 'publish_up' => 1, 'publish_down' => 1, 'access' => 1) : array('timezone_info' => 1, 'publication_details' => 1));
     $placeable_fields = array_merge($via_core_field, $via_core_prop);
     // 3. Decide placement of CORE properties / fields
     $tab_fields['above'] = $params->get('form_tabs_above', 'title, alias, type, state, disable_comments, notify_subscribers');
     $tab_fields['tab01'] = $params->get('form_tab01_fields', 'categories, tags, language, perms');
     $tab_fields['tab02'] = $params->get('form_tab02_fields', 'maintext');
     $tab_fields['tab03'] = $params->get('form_tab03_fields', 'fields_manager');
     $tab_fields['tab04'] = $params->get('form_tab04_fields', !FLEXI_J16GE ? 'timezone_info, publication_details' : 'timezone_info, created, createdby, created_by_alias, publish_up, publish_down, access');
     $tab_fields['tab05'] = $params->get('form_tab05_fields', 'metadata, seoconf');
     $tab_fields['tab06'] = $params->get('form_tab06_fields', 'display_params');
     $tab_fields['tab07'] = $params->get('form_tab07_fields', 'layout_selection, layout_params');
     $tab_fields['fman'] = $params->get('form_tabs_fieldsman', '');
     $tab_fields['below'] = $params->get('form_tabs_below', '');
     // fix aliases
     foreach ($tab_fields as $tab_name => $field_list) {
         $field_list = str_replace('created_by', 'createdby', $field_list);
         $field_list = str_replace('createdby_alias', 'created_by_alias', $field_list);
         $tab_fields[$tab_name] = $field_list;
     }
     //echo "<pre>"; print_r($tab_fields); echo "</pre>";
     // Split field lists
     $all_tab_fields = array();
     foreach ($tab_fields as $i => $field_list) {
         $tab_fields[$i] = empty($tab_fields[$i]) || $tab_fields[$i] == '_skip_' ? array() : array_flip(preg_split("/[\\s]*,[\\s]*/", $field_list));
         foreach ($tab_fields[$i] as $tbl_name => $ignore) {
             $all_tab_fields[$tbl_name] = 1;
         }
         //$all_tab_fields = array_merge($all_tab_fields, $tab_fields[$i]);
     }
     // Find fields missing from configuration, and place them below the tabs
     foreach ($placeable_fields as $fn => $i) {
         if (!isset($all_tab_fields[$fn])) {
             $tab_fields['below'][$fn] = 1;
         }
     }
     // get TAB titles
     $_tmp = $params->get('form_tab_titles', '1:FLEXI_BASIC, 2:FLEXI_DESCRIPTION, 3:__TYPE_NAME__, 4:FLEXI_PUBLISHING, 5:FLEXI_META_SEO, 6:FLEXI_DISPLAYING, 7:FLEXI_TEMPLATE');
     // Create title of the custom fields default TAB (field manager TAB)
     if ($item->type_id) {
         $types_arr = flexicontent_html::getTypesList();
         $typename = @$types_arr[$item->type_id]['name'];
         $typename = $typename ? JText::_($typename) : JText::_('FLEXI_CONTENT_TYPE');
         $typename = $typename . ' (' . JText::_('FLEXI_DETAILS') . ')';
     } else {
         $typename = JText::_('FLEXI_TYPE_NOT_DEFINED');
     }
     // Split title of default tabs and language filter the titles
     $_tmp = preg_split("/[\\s]*,[\\s]*/", $_tmp);
     $tab_titles = array();
     foreach ($_tmp as $_data) {
         list($tab_no, $tab_title) = preg_split("/[\\s]*:[\\s]*/", $_data);
         if ($tab_title == '__TYPE_NAME__') {
             $tab_titles['tab0' . $tab_no] = $typename;
         } else {
             $tab_titles['tab0' . $tab_no] = JText::_($tab_title);
         }
     }
     // 4. find if some fields are missing placement field
     $coreprop_missing = array();
     foreach ($via_core_prop as $fn => $i) {
         // -EITHER- configured to be shown at default position -OR-
         if (isset($tab_fields['fman'][$fn]) && !isset($core_placers[$fn])) {
             $coreprop_missing[$fn] = true;
             unset($tab_fields['fman'][$fn]);
             $tab_fields['below'][$fn] = 1;
         }
     }
     $placementConf['via_core_field'] = $via_core_field;
     $placementConf['via_core_prop'] = $via_core_prop;
     $placementConf['placeable_fields'] = $placeable_fields;
     $placementConf['tab_fields'] = $tab_fields;
     $placementConf['tab_titles'] = $tab_titles;
     $placementConf['all_tab_fields'] = $all_tab_fields;
     $placementConf['coreprop_missing'] = $coreprop_missing;
     return $placementConf;
 }
开发者ID:jakesyl,项目名称:flexicontent,代码行数:89,代码来源:view.html.php


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