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


PHP ModulesHelper::getModules方法代码示例

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


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

示例1:

				<option value=""><?php 
echo JText::_('COM_MODULES_OPTION_SELECT_POSITION');
?>
</option>
				<?php 
echo JHtml::_('select.options', ModulesHelper::getPositions($this->state->get('filter.client_id')), 'value', 'text', $this->state->get('filter.position'));
?>
			</select>

            <select name="filter_module" class="inputbox" onchange="this.form.submit()">
				<option value=""><?php 
echo JText::_('COM_MODULES_OPTION_SELECT_MODULE');
?>
</option>
				<?php 
echo JHtml::_('select.options', ModulesHelper::getModules($this->state->get('filter.client_id')), 'value', 'text', $this->state->get('filter.module'));
?>
			</select>



			<select name="filter_access" class="inputbox" onchange="this.form.submit()">
				<option value=""><?php 
echo JText::_('JOPTION_SELECT_ACCESS');
?>
</option>
				<?php 
echo JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access'));
?>
			</select>
开发者ID:rvsjoen,项目名称:joomla-cms,代码行数:30,代码来源:default.php

示例2: getOptions

 /**
  * Method to get the field options.
  *
  * @return  array  The field option objects.
  *
  * @since   3.4.2
  */
 public function getOptions()
 {
     $clientId = JFactory::getApplication()->input->get('client_id', 0, 'int');
     $options = ModulesHelper::getModules($clientId);
     return array_merge(parent::getOptions(), $options);
 }
开发者ID:SysBind,项目名称:joomla-cms,代码行数:13,代码来源:modulesmodule.php

示例3: getOptions

 protected function getOptions()
 {
     $model = new AdvancedModulesModelModules();
     $client_id = $model->getState('stfilter.client_id');
     return array_merge(JFormFieldList::getOptions(), ModulesHelper::getModules($client_id));
 }
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:6,代码来源:module.php

示例4: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @return  void
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     $state = $this->get('State');
     $canDo = JHelperContent::getActions('com_modules');
     $user = JFactory::getUser();
     // Get the toolbar object instance
     $bar = JToolBar::getInstance('toolbar');
     if ($this->config->list_title) {
         JToolbarHelper::title(JText::_('COM_MODULES_MANAGER_MODULES'), 'cube module');
     } else {
         JToolbarHelper::title(JText::_('AMM_ADVANCED_MODULE_MANAGER'), 'advancedmodulemanager icon-nonumber');
     }
     if ($canDo->get('core.create')) {
         // Instantiate a new JLayoutFile instance and render the layout
         $layout = new JLayoutFile('toolbar.newmodule');
         $bar->appendButton('Custom', $layout->render(array()), 'new');
     }
     if ($canDo->get('core.edit')) {
         JToolbarHelper::editList('module.edit');
     }
     if ($canDo->get('core.create')) {
         JToolbarHelper::custom('modules.duplicate', 'copy', 'copy_f2', 'JTOOLBAR_DUPLICATE', true);
     }
     if ($canDo->get('core.edit.state')) {
         JToolbarHelper::publish('modules.publish', 'JTOOLBAR_PUBLISH', true);
         JToolbarHelper::unpublish('modules.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         JToolbarHelper::checkin('modules.checkin');
     }
     if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         JToolbarHelper::deleteList('', 'modules.delete', 'JTOOLBAR_EMPTY_TRASH');
     } elseif ($canDo->get('core.edit.state')) {
         JToolbarHelper::trash('modules.trash');
     }
     // Add a batch button
     if ($user->authorise('core.create', 'com_modules') && $user->authorise('core.edit', 'com_modules') && $user->authorise('core.edit.state', 'com_modules')) {
         JHtml::_('bootstrap.modal', 'collapseModal');
         $title = JText::_('JTOOLBAR_BATCH');
         // Instantiate a new JLayoutFile instance and render the batch button
         $layout = new JLayoutFile('joomla.toolbar.batch');
         $dhtml = $layout->render(array('title' => $title));
         $bar->appendButton('Custom', $dhtml, 'batch');
     }
     if ($canDo->get('core.admin')) {
         JToolbarHelper::preferences('com_advancedmodules', 600, 900);
     }
     JToolbarHelper::help('JHELP_EXTENSIONS_MODULE_MANAGER');
     JHtmlSidebar::setAction('index.php?option=com_advancedmodules');
     JHtmlSidebar::addFilter(JText::_('NN_OPTION_SELECT_CLIENT'), 'filter_client_id', JHtml::_('select.options', ModulesHelper::getClientOptions(), 'value', 'text', $this->state->get('filter.client_id')), false);
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_state', JHtml::_('select.options', ModulesHelper::getStateOptions(), 'value', 'text', $this->state->get('filter.state')));
     JHtmlSidebar::addFilter(JText::_('COM_MODULES_OPTION_SELECT_POSITION'), 'filter_position', JHtml::_('select.options', ModulesHelper::getPositions($this->state->get('filter.client_id')), 'value', 'text', $this->state->get('filter.position')));
     JHtmlSidebar::addFilter(JText::_('COM_MODULES_OPTION_SELECT_MODULE'), 'filter_module', JHtml::_('select.options', ModulesHelper::getModules($this->state->get('filter.client_id')), 'value', 'text', $this->state->get('filter.module')));
     JHtmlSidebar::addFilter(JText::_('AMM_OPTION_SELECT_MENU_ID'), 'filter_menuid', JHtml::_('select.options', ModulesHelper::getMenuItemAssignmentOptions($this->state->get('filter.client_id')), 'value', 'text', $this->state->get('filter.menuid')));
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_ACCESS'), 'filter_access', JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')));
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_LANGUAGE'), 'filter_language', JHtml::_('select.options', JHtml::_('contentlanguage.existing', true, true), 'value', 'text', $this->state->get('filter.language')));
     $this->sidebar = JHtmlSidebar::render();
 }
开发者ID:jputz12,项目名称:OneNow-Vshop,代码行数:63,代码来源:view.html.php

示例5: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     $state = $this->get('State');
     $canDo = ModulesHelper::getActions();
     // Get the toolbar object instance
     $bar = JToolBar::getInstance('toolbar');
     JToolbarHelper::title(JText::_($this->config->list_title ? 'COM_MODULES_MANAGER_MODULES' : 'AMM_ADVANCED_MODULES_MANAGER'), 'module.png');
     if ($canDo->get('core.create')) {
         $title = JText::_('JTOOLBAR_NEW');
         $dhtml = "<button onClick=\"location.href='index.php?option=com_advancedmodules&amp;view=select'\" class=\"btn btn-small btn-success\">\n\t\t\t\t\t\t<i class=\"icon-plus icon-white\" title=\"{$title}\"></i>\n\t\t\t\t\t\t{$title}</button>";
         $bar->appendButton('Custom', $dhtml, 'new');
     }
     if ($canDo->get('core.edit')) {
         JToolbarHelper::editList('module.edit');
     }
     if ($canDo->get('core.create')) {
         JToolbarHelper::custom('modules.duplicate', 'copy.png', 'copy_f2.png', 'JTOOLBAR_DUPLICATE', true);
     }
     if ($canDo->get('core.edit.state')) {
         JToolbarHelper::publish('modules.publish', 'JTOOLBAR_PUBLISH', true);
         JToolbarHelper::unpublish('modules.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         JToolbarHelper::checkin('modules.checkin');
     }
     if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         JToolbarHelper::deleteList('', 'modules.delete', 'JTOOLBAR_EMPTY_TRASH');
     } elseif ($canDo->get('core.edit.state')) {
         JToolbarHelper::trash('modules.trash');
     }
     // Add a batch button
     if ($canDo->get('core.edit')) {
         JHtml::_('bootstrap.modal', 'collapseModal');
         $title = JText::_('JTOOLBAR_BATCH');
         $dhtml = "<button data-toggle=\"modal\" data-target=\"#collapseModal\" class=\"btn btn-small\">\n\t\t\t\t\t\t<i class=\"icon-checkbox-partial\" title=\"{$title}\"></i>\n\t\t\t\t\t\t{$title}</button>";
         $bar->appendButton('Custom', $dhtml, 'batch');
     }
     if ($canDo->get('core.admin')) {
         JToolbarHelper::preferences('com_advancedmodules', 600, 900);
     }
     JToolbarHelper::help('JHELP_EXTENSIONS_MODULE_MANAGER');
     JHtmlSidebar::addEntry(JText::_('JSITE'), 'index.php?option=com_advancedmodules&filter_client_id=0', $this->state->get('filter.client_id') == 0);
     JHtmlSidebar::addEntry(JText::_('JADMINISTRATOR'), 'index.php?option=com_advancedmodules&filter_client_id=1', $this->state->get('filter.client_id') == 1);
     JHtmlSidebar::setAction('index.php?option=com_modules');
     JHtmlSidebar::addFilter('', 'filter_client_id', JHtml::_('select.options', ModulesHelper::getClientOptions(), 'value', 'text', $this->state->get('filter.client_id')), false);
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_state', JHtml::_('select.options', ModulesHelper::getStateOptions(), 'value', 'text', $this->state->get('filter.state')));
     JHtmlSidebar::addFilter(JText::_('COM_MODULES_OPTION_SELECT_POSITION'), 'filter_position', JHtml::_('select.options', ModulesHelper::getPositions($this->state->get('filter.client_id')), 'value', 'text', $this->state->get('filter.position')));
     JHtmlSidebar::addFilter(JText::_('COM_MODULES_OPTION_SELECT_MODULE'), 'filter_module', JHtml::_('select.options', ModulesHelper::getModules($this->state->get('filter.client_id')), 'value', 'text', $this->state->get('filter.module')));
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_ACCESS'), 'filter_access', JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')));
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_LANGUAGE'), 'filter_language', JHtml::_('select.options', JHtml::_('contentlanguage.existing', true, true), 'value', 'text', $this->state->get('filter.language')));
     $this->sidebar = JHtmlSidebar::render();
 }
开发者ID:AxelFG,项目名称:ckbran-inf,代码行数:55,代码来源:view.html.php


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