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


PHP FLEXISubmenu函数代码示例

本文整理汇总了PHP中FLEXISubmenu函数的典型用法代码示例。如果您正苦于以下问题:PHP FLEXISubmenu函数的具体用法?PHP FLEXISubmenu怎么用?PHP FLEXISubmenu使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: display

 /**
  * Display the view
  */
 public function display($tpl = null)
 {
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     $this->state = $this->get('State');
     $document = JFactory::getDocument();
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     //add css and submenu to document
     $document->addStyleSheet(JURI::base() . 'components/com_flexicontent/assets/css/flexicontentbackend.css');
     if (FLEXI_J30GE) {
         $document->addStyleSheet(JURI::base() . 'components/com_flexicontent/assets/css/j3x.css');
     } else {
         if (FLEXI_J16GE) {
             $document->addStyleSheet(JURI::base() . 'components/com_flexicontent/assets/css/j25.css');
         } else {
             $document->addStyleSheet(JURI::base() . 'components/com_flexicontent/assets/css/j15.css');
         }
     }
     // Get User's Global Permissions
     $perms = FlexicontentHelperPerm::getPerm();
     // Create Submenu (and also check access to current view)
     FLEXISubmenu('CanGroups');
     // Create document/toolbar titles
     $doc_title = JText::_('FLEXI_GROUPS');
     $site_title = $document->getTitle();
     JToolBarHelper::title($doc_title, 'groups');
     $document->setTitle($doc_title . ' - ' . $site_title);
     // Create the toolbar
     $this->addToolbar();
     parent::display($tpl);
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:38,代码来源:view.html.php

示例2: display

 function display($tpl = null)
 {
     //initialise variables
     $mainframe = JFactory::getApplication();
     $option = JRequest::getVar('option');
     $document = JFactory::getDocument();
     $user = JFactory::getUser();
     $db = JFactory::getDBO();
     JHTML::_('behavior.tooltip');
     JHTML::_('behavior.modal');
     //add css and submenu to document
     $document->addStyleSheet(JURI::base() . 'components/com_flexicontent/assets/css/flexicontentbackend.css');
     if (FLEXI_J30GE) {
         $document->addStyleSheet(JURI::base() . 'components/com_flexicontent/assets/css/j3x.css');
     } else {
         if (FLEXI_J16GE) {
             $document->addStyleSheet(JURI::base() . 'components/com_flexicontent/assets/css/j25.css');
         } else {
             $document->addStyleSheet(JURI::base() . 'components/com_flexicontent/assets/css/j15.css');
         }
     }
     $permission = FlexicontentHelperPerm::getPerm();
     if (!$permission->CanTemplates) {
         $mainframe->redirect('index.php?option=com_flexicontent', JText::_('FLEXI_NO_ACCESS'));
     }
     // Get User's Global Permissions
     $perms = FlexicontentHelperPerm::getPerm();
     //Create Submenu
     FLEXISubmenu('CanTemplates');
     // Create document/toolbar titles
     $doc_title = JText::_('FLEXI_TEMPLATES');
     $site_title = $document->getTitle();
     JToolBarHelper::title($doc_title, 'templates');
     $document->setTitle($doc_title . ' - ' . $site_title);
     // Create the toolbar
     //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');
     }
     $tmpldirectory = JPATH_COMPONENT_SITE . DS . 'templates' . DS;
     $source = JRequest::getString('source', '');
     $dest = $source ? flexicontent_upload::sanitizedir($tmpldirectory, $source) : '';
     //Get data from the model
     $rows = $this->get('Data');
     //assign data to template
     $this->assignRef('rows', $rows);
     $this->assignRef('user', $user);
     $this->assignRef('tmpldirectory', $tmpldirectory);
     $this->assignRef('source', $source);
     $this->assignRef('dest', $dest);
     parent::display($tpl);
 }
开发者ID:jakesyl,项目名称:flexicontent,代码行数:58,代码来源:view.html.php

示例3: display

 function display($tpl = null)
 {
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     $this->state = $this->get('State');
     $app = JFactory::getApplication();
     $cparams = JComponentHelper::getParams('com_flexicontent');
     $user = JFactory::getUser();
     $db = JFactory::getDBO();
     $document = JFactory::getDocument();
     $option = JRequest::getCmd('option');
     $view = JRequest::getVar('view');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     // Get filters
     $count_filters = 0;
     $search = $app->getUserStateFromRequest($option . '.' . $view . '.search', 'search', '', 'string');
     $search = FLEXI_J16GE ? $db->escape(trim(JString::strtolower($search))) : $db->getEscaped(trim(JString::strtolower($search)));
     // **************************
     // Add css and js to document
     // **************************
     $document->addStyleSheet(JURI::base(true) . '/components/com_flexicontent/assets/css/flexicontentbackend.css');
     if (FLEXI_J30GE) {
         $document->addStyleSheet(JURI::base(true) . '/components/com_flexicontent/assets/css/j3x.css');
     } else {
         if (FLEXI_J16GE) {
             $document->addStyleSheet(JURI::base(true) . '/components/com_flexicontent/assets/css/j25.css');
         }
     }
     // *****************************
     // Get user's global permissions
     // *****************************
     $perms = FlexicontentHelperPerm::getPerm();
     // ************************
     // Create Submenu & Toolbar
     // ************************
     // Create Submenu (and also check access to current view)
     FLEXISubmenu('CanGroups');
     // Create document/toolbar titles
     $doc_title = JText::_('FLEXI_GROUPS');
     $site_title = $document->getTitle();
     JToolBarHelper::title($doc_title, 'groups');
     $document->setTitle($doc_title . ' - ' . $site_title);
     // Create the toolbar
     $this->sidebar = FLEXI_J30GE ? JHtmlSidebar::render() : null;
     $this->addToolbar();
     //assign data to template
     $this->lists['search'] = $search;
     $this->count_filters = $count_filters;
     $this->option = $option;
     $this->view = $view;
     parent::display($tpl);
 }
开发者ID:noxidsoft,项目名称:flexicontent-cck,代码行数:56,代码来源:view.html.php

示例4: display


//.........这里部分代码省略.........
        if (strlen($search)) {
            $js .= "jQuery('.col_title').each(function(){ jQuery(this).addClass('yellow'); });";
        }
        // *****************************
        // Get user's global permissions
        // *****************************
        $perms = FlexicontentHelperPerm::getPerm();
        $CanEdit = $perms->CanEdit;
        $CanPublish = $perms->CanPublish;
        $CanDelete = $perms->CanDelete;
        $CanEditOwn = $perms->CanEditOwn;
        $CanPublishOwn = $perms->CanPublishOwn;
        $CanDeleteOwn = $perms->CanDeleteOwn;
        $hasEdit = $CanEdit || $CanEditOwn;
        $hasPublish = $CanPublish || $CanPublishOwn;
        $hasDelete = $CanDelete || $CanDeleteOwn;
        $CanCats = $perms->CanCats;
        $CanAccLvl = $perms->CanAccLvl;
        $CanOrder = $perms->CanOrder;
        $CanCopy = $perms->CanCopy;
        $CanArchives = $perms->CanArchives;
        // Check if user can create in at least one published category
        require_once "components/com_flexicontent/models/item.php";
        $itemmodel = new FlexicontentModelItem();
        $CanAdd = $itemmodel->getItemAccess()->get('access-create');
        // *****************************
        // Get user's global permissions
        // *****************************
        $perms = FlexicontentHelperPerm::getPerm();
        // ************************
        // Create Submenu & Toolbar
        // ************************
        // Create Submenu (and also check access to current view)
        FLEXISubmenu('notvariable');
        // Create document/toolbar titles
        $doc_title = JText::_('FLEXI_ITEMS');
        $site_title = $document->getTitle();
        JToolBarHelper::title($doc_title, 'items');
        $document->setTitle($doc_title . ' - ' . $site_title);
        $toolbar = JToolBar::getInstance('toolbar');
        // Implementation of multiple-item state selector
        $add_divider = false;
        if ($hasPublish) {
            $btn_task = '';
            $ctrl_task = '&task=items.selectstate';
            $popup_load_url = JURI::base() . 'index.php?option=com_flexicontent' . $ctrl_task . '&format=raw';
            if (FLEXI_J30GE || !FLEXI_J16GE) {
                // Layout of Popup button broken in J3.1, add in J1.5 it generates duplicate HTML tag id (... just for validation), so add manually
                $js .= "\n\t\t\t\t\tjQuery('#toolbar-publish a.toolbar, #toolbar-publish button')\n\t\t\t\t\t\t.attr('onclick', 'javascript:;')\n\t\t\t\t\t\t.attr('href', '" . $popup_load_url . "')\n\t\t\t\t\t\t.attr('rel', '{handler: \\'iframe\\', size: {x: 800, y: 240}, onClose: function() {}}');\n\t\t\t\t";
                //JToolBarHelper::publishList( $btn_task );
                JToolBarHelper::custom($btn_task, 'publish.png', 'publish_f2.png', 'FLEXI_CHANGE_STATE', false);
                JHtml::_('behavior.modal', '#toolbar-publish a.toolbar, #toolbar-publish button');
            } else {
                $toolbar->appendButton('Popup', 'publish', JText::_('FLEXI_CHANGE_STATE'), str_replace('&', '&', $popup_load_url), 800, 240);
            }
            $add_divider = true;
        }
        if ($hasDelete) {
            if ($filter_state && in_array('T', $filter_state)) {
                //$btn_msg = JText::_('FLEXI_ARE_YOU_SURE');
                //$btn_task = 'items.remove';
                //JToolBarHelper::deleteList($btn_msg, $btn_task);
                $msg_alert = JText::sprintf('FLEXI_SELECT_LIST_ITEMS_TO', JText::_('FLEXI_DELETE'));
                $msg_confirm = JText::_('FLEXI_ARE_YOU_SURE');
                $btn_task = 'items.remove';
                $extra_js = "";
开发者ID:nettdotkomm,项目名称:flexicontent-cck,代码行数:67,代码来源:view.html.php

示例5: display

 function display($tpl = null)
 {
     //initialise variables
     $app = JFactory::getApplication();
     $cparams = JComponentHelper::getParams('com_flexicontent');
     $user = JFactory::getUser();
     $db = JFactory::getDBO();
     $document = JFactory::getDocument();
     $option = JRequest::getCmd('option');
     $view = JRequest::getVar('view');
     // Get model
     $model = $this->getModel();
     $print_logging_info = $cparams->get('print_logging_info');
     if ($print_logging_info) {
         global $fc_run_times;
     }
     // ***********
     // Get filters
     // ***********
     $count_filters = 0;
     // Order and order direction
     $filter_order = $model->getState('filter_order');
     $filter_order_Dir = $model->getState('filter_order_Dir');
     // Get filter vars
     $filter_state = $model->getState('filter_state');
     $filter_assigned = $model->getState('filter_assigned');
     if ($filter_state) {
         $count_filters++;
     }
     if ($filter_assigned) {
         $count_filters++;
     }
     // Text search
     $search = $model->getState('search');
     $search = $db->escape(trim(JString::strtolower($search)));
     // ****************************
     // Important usability messages
     // ****************************
     if ($cparams->get('show_usability_messages', 1)) {
     }
     // **************************
     // Add css and js to document
     // **************************
     flexicontent_html::loadFramework('select2');
     //JHTML::_('behavior.tooltip');
     $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);
     // *****************************
     // Get user's global permissions
     // *****************************
     $perms = FlexicontentHelperPerm::getPerm();
     // ************************
     // Create Submenu & Toolbar
     // ************************
     // Create Submenu (and also check access to current view)
     FLEXISubmenu('CanTags');
     // Create document/toolbar titles
     $doc_title = JText::_('FLEXI_TAGS');
     $site_title = $document->getTitle();
     JToolBarHelper::title($doc_title, 'tags');
     $document->setTitle($doc_title . ' - ' . $site_title);
     // Create the toolbar
     $js = "jQuery(document).ready(function(){";
     $contrl = FLEXI_J16GE ? "tags." : "";
     $toolbar = JToolBar::getInstance('toolbar');
     if ($perms->CanConfig) {
         $btn_task = '';
         $popup_load_url = JURI::base() . 'index.php?option=com_flexicontent&view=tags&layout=import&tmpl=component';
         if (FLEXI_J30GE || !FLEXI_J16GE) {
             // Layout of Popup button broken in J3.1, add in J1.5 it generates duplicate HTML tag id (... just for validation), so add manually
             $js .= "\n\t\t\t\t\tjQuery('#toolbar-import a.toolbar, #toolbar-import button')\n\t\t\t\t\t\t.attr('onclick', 'javascript:;')\n\t\t\t\t\t\t.attr('href', '" . $popup_load_url . "')\n\t\t\t\t\t\t.attr('rel', '{handler: \\'iframe\\', size: {x: 430, y: 500}, onClose: function() {}}');\n\t\t\t\t";
             JToolBarHelper::custom($btn_task, 'import.png', 'import_f2.png', 'FLEXI_IMPORT', false);
             JHtml::_('behavior.modal', '#toolbar-import a.toolbar, #toolbar-import button');
         } else {
             $toolbar->appendButton('Popup', 'import', JText::_('FLEXI_IMPORT'), str_replace('&', '&', $popup_load_url), 430, 500);
         }
         JToolBarHelper::divider();
         JToolBarHelper::spacer();
     }
     JToolBarHelper::publishList($contrl . 'publish');
     JToolBarHelper::unpublishList($contrl . 'unpublish');
     if ($perms->CanCreateTags) {
         JToolBarHelper::addNew($contrl . 'add');
     }
     JToolBarHelper::editList($contrl . 'edit');
     //JToolBarHelper::deleteList(JText::_('FLEXI_ARE_YOU_SURE'), $contrl.'remove');
     // This will work in J2.5+ too and is offers more options (above a little bogus in J1.5, e.g. bad HTML id tag)
     $msg_alert = JText::sprintf('FLEXI_SELECT_LIST_ITEMS_TO', JText::_('FLEXI_DELETE'));
     $msg_confirm = JText::_('FLEXI_ITEMS_DELETE_CONFIRM');
     $btn_task = $contrl . 'remove';
     $extra_js = "";
     flexicontent_html::addToolBarButton('FLEXI_DELETE', 'delete', '', $msg_alert, $msg_confirm, $btn_task, $extra_js, $btn_list = true, $btn_menu = true, $btn_confirm = true);
     // Checkin
     JToolbarHelper::checkin($contrl . 'checkin');
     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;
//.........这里部分代码省略.........
开发者ID:khetsothea,项目名称:flexicontent-cck,代码行数:101,代码来源:view.html.php


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