• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP UsersHelper类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     $canDo = UsersHelper::getActions();
     JToolBarHelper::title(JText::_('COM_USERS_VIEW_USERS_TITLE'), 'user');
     if ($canDo->get('core.create')) {
         JToolBarHelper::addNew('user.add');
     }
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editList('user.edit');
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::divider();
         JToolBarHelper::publish('users.activate', 'COM_USERS_TOOLBAR_ACTIVATE', true);
         JToolBarHelper::unpublish('users.block', 'COM_USERS_TOOLBAR_BLOCK', true);
         JToolBarHelper::custom('users.unblock', 'unblock.png', 'unblock_f2.png', 'COM_USERS_TOOLBAR_UNBLOCK', true);
         JToolBarHelper::divider();
     }
     if ($canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'users.delete');
         JToolBarHelper::divider();
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_users');
         JToolBarHelper::divider();
     }
     JToolBarHelper::help('JHELP_USERS_USER_MANAGER');
 }
开发者ID:exntu,项目名称:joomla-cms,代码行数:32,代码来源:view.html.php


示例2: display

 /**
  * Method to display a view.
  *
  * @param	boolean			If true, the view output will be cached
  * @param	array			An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
  *
  * @return	JController		This object to support chaining.
  * @since	1.5
  */
 public function display($cachable = false, $urlparams = false)
 {
     require_once JPATH_COMPONENT . '/helpers/users.php';
     // Load the submenu.
     UsersHelper::addSubmenu(JRequest::getCmd('view', 'users'));
     $view = JRequest::getCmd('view', 'users');
     $layout = JRequest::getCmd('layout', 'default');
     $id = JRequest::getInt('id');
     if (!$this->canView($view)) {
         JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
         return;
     }
     // Check for edit form.
     if ($view == 'user' && $layout == 'edit' && !$this->checkEditId('com_users.edit.user', $id)) {
         // Somehow the person just went to the form - we don't allow that.
         $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id));
         $this->setMessage($this->getError(), 'error');
         $this->setRedirect(JRoute::_('index.php?option=com_users&view=users', false));
         return false;
     } elseif ($view == 'group' && $layout == 'edit' && !$this->checkEditId('com_users.edit.group', $id)) {
         // Somehow the person just went to the form - we don't allow that.
         $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id));
         $this->setMessage($this->getError(), 'error');
         $this->setRedirect(JRoute::_('index.php?option=com_users&view=groups', false));
         return false;
     } elseif ($view == 'level' && $layout == 'edit' && !$this->checkEditId('com_users.edit.level', $id)) {
         // Somehow the person just went to the form - we don't allow that.
         $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id));
         $this->setMessage($this->getError(), 'error');
         $this->setRedirect(JRoute::_('index.php?option=com_users&view=levels', false));
         return false;
     }
     return parent::display();
 }
开发者ID:Simarpreet05,项目名称:joomla,代码行数:43,代码来源:controller.php


示例3: defaultTpl

 function defaultTpl($tpl = null)
 {
     JToolBarHelper::title(JText::_('STOP WORDS'), 'tag.png');
     $canDo = UsersHelper::getActions();
     if ($canDo->get('core.create')) {
         JToolBarHelper::apply();
         JToolBarHelper::spacer();
         JToolBarHelper::save();
         JToolBarHelper::spacer();
         JToolBarHelper::custom('restore', 'default', '', JText::_('RESTORE DEFAULT'), false);
         JToolBarHelper::spacer();
     }
     JToolBarHelper::back(JText::_('CEDTAG_CONTROL_PANEL'), 'index.php?option=com_cedtag');
     $lang = strval(JFactory::getLanguage()->getDefault());
     $file = JPATH_ADMINISTRATOR . '/components/com_cedtag/stopwords/stopwords_' . $lang . '.php';
     if (!is_file($file)) {
         JFile::copy(JPATH_ADMINISTRATOR . '/components/com_cedtag/stopwords/stopwords_en-GB-default.php', $file);
     }
     $isWritable = is_writable($file);
     $FileContent = trim(file_get_contents($file));
     $this->assign('isWritable', $isWritable);
     $this->assignRef('FileName', $file);
     $this->assignRef('FileContent', $FileContent);
     parent::display($tpl);
 }
开发者ID:lautarodragan,项目名称:ideary,代码行数:25,代码来源:view.html.php


示例4: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     Request::setVar('hidemainmenu', 1);
     $user = JFactory::getUser();
     $isNew = $this->item->id == 0;
     $canDo = UsersHelper::getActions();
     Toolbar::title(Lang::txt($isNew ? 'COM_USERS_VIEW_NEW_LEVEL_TITLE' : 'COM_USERS_VIEW_EDIT_LEVEL_TITLE'), 'levels-add');
     if ($canDo->get('core.edit') || $canDo->get('core.create')) {
         Toolbar::apply('level.apply');
         Toolbar::save('level.save');
     }
     if ($canDo->get('core.create')) {
         Toolbar::save2new('level.save2new');
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         Toolbar::save2copy('level.save2copy');
     }
     if (empty($this->item->id)) {
         Toolbar::cancel('level.cancel');
     } else {
         Toolbar::cancel('level.cancel', 'JTOOLBAR_CLOSE');
     }
     Toolbar::divider();
     Toolbar::help('level');
 }
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:31,代码来源:view.html.php


示例5: display

 /**
  * Method to display the view.
  *
  * @param   string	The template file to include
  * @since   1.5
  */
 public function display($tpl = null)
 {
     // Get the view data.
     $this->user = JFactory::getUser();
     $this->form = $this->get('Form');
     $this->state = $this->get('State');
     $this->params = $this->state->get('params');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode('<br />', $errors));
         return false;
     }
     // Check for layout override
     $active = JFactory::getApplication()->getMenu()->getActive();
     if (isset($active->query['layout'])) {
         $this->setLayout($active->query['layout']);
     }
     require_once JPATH_ADMINISTRATOR . '/components/com_users/helpers/users.php';
     $tfa = UsersHelper::getTwoFactorMethods();
     $this->tfa = is_array($tfa) && count($tfa) > 1;
     //Escape strings for HTML output
     $this->pageclass_sfx = htmlspecialchars($this->params->get('pageclass_sfx'));
     $this->prepareDocument();
     parent::display($tpl);
 }
开发者ID:01J,项目名称:skazkipronebo,代码行数:31,代码来源:view.html.php


示例6: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     JRequest::setVar('hidemainmenu', 1);
     $user = JFactory::getUser();
     $isNew = $this->item->id == 0;
     $canDo = UsersHelper::getActions();
     JToolBarHelper::title(JText::_($isNew ? 'COM_USERS_VIEW_NEW_LEVEL_TITLE' : 'COM_USERS_VIEW_EDIT_LEVEL_TITLE'), 'levels-add');
     if ($canDo->get('core.edit') || $canDo->get('core.create')) {
         JToolBarHelper::apply('level.apply', 'JTOOLBAR_APPLY');
         JToolBarHelper::save('level.save', 'JTOOLBAR_SAVE');
     }
     if ($canDo->get('core.create')) {
         JToolBarHelper::custom('level.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false);
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         JToolBarHelper::custom('level.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false);
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('level.cancel', 'JTOOLBAR_CANCEL');
     } else {
         JToolBarHelper::cancel('level.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('JHELP_USERS_ACCESS_LEVELS_EDIT');
 }
开发者ID:akksi,项目名称:jcg,代码行数:31,代码来源:view.html.php


示例7: addToolbar

 /**
  * Display the toolbar.
  *
  * @return  void
  *
  * @since   2.5
  */
 protected function addToolbar()
 {
     $input = JFactory::getApplication()->input;
     $input->set('hidemainmenu', 1);
     $user = JFactory::getUser();
     $isNew = $this->item->id == 0;
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));
     $canDo = UsersHelper::getActions($this->state->get('filter.category_id'), $this->item->id);
     JToolbarHelper::title(JText::_('COM_USERS_NOTES'), 'users user');
     // If not checked out, can save the item.
     if (!$checkedOut && ($canDo->get('core.edit') || count($user->getAuthorisedCategories('com_users', 'core.create')))) {
         JToolbarHelper::apply('note.apply');
         JToolbarHelper::save('note.save');
     }
     if (!$checkedOut && count($user->getAuthorisedCategories('com_users', 'core.create'))) {
         JToolbarHelper::save2new('note.save2new');
     }
     // If an existing item, can save to a copy.
     if (!$isNew && count($user->getAuthorisedCategories('com_users', 'core.create')) > 0) {
         JToolbarHelper::save2copy('note.save2copy');
     }
     if (empty($this->item->id)) {
         JToolbarHelper::cancel('note.cancel');
     } else {
         if ($this->state->params->get('save_history', 0) && $user->authorise('core.edit')) {
             JToolbarHelper::versions('com_users.note', $this->item->id);
         }
         JToolbarHelper::cancel('note.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolbarHelper::divider();
     JToolbarHelper::help('JHELP_USERS_USER_NOTES_EDIT');
 }
开发者ID:shoffmann52,项目名称:install-from-web-server,代码行数:39,代码来源:view.html.php


示例8: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     JFactory::getApplication()->input->set('hidemainmenu', true);
     $user = JFactory::getUser();
     $isNew = $this->item->id == 0;
     $canDo = UsersHelper::getActions();
     JToolbarHelper::title(JText::_($isNew ? 'COM_USERS_VIEW_NEW_LEVEL_TITLE' : 'COM_USERS_VIEW_EDIT_LEVEL_TITLE'), 'levels-add');
     if ($canDo->get('core.edit') || $canDo->get('core.create')) {
         JToolbarHelper::apply('level.apply');
         JToolbarHelper::save('level.save');
     }
     if ($canDo->get('core.create')) {
         JToolbarHelper::save2new('level.save2new');
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         JToolbarHelper::save2copy('level.save2copy');
     }
     if (empty($this->item->id)) {
         JToolbarHelper::cancel('level.cancel');
     } else {
         JToolbarHelper::cancel('level.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolbarHelper::divider();
     JToolbarHelper::help('JHELP_USERS_ACCESS_LEVELS_EDIT');
 }
开发者ID:interfaceslivres,项目名称:ccmd-ufpb,代码行数:31,代码来源:view.html.php


示例9: display

 /**
  * Override the display method for the view.
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  mixed  A string if successful, otherwise a JError object.
  *
  * @since   2.5
  */
 public function display($tpl = null)
 {
     // Initialise view variables.
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     $this->state = $this->get('State');
     $this->user = $this->get('User');
     $this->filterForm = $this->get('FilterForm');
     $this->activeFilters = $this->get('ActiveFilters');
     UsersHelper::addSubmenu('notes');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         throw new Exception(implode("\n", $errors), 500);
     }
     // Get the component HTML helpers
     JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
     // Turn parameters into registry objects
     foreach ($this->items as $item) {
         $item->cparams = new Registry();
         $item->cparams->loadString($item->category_params);
     }
     $this->addToolbar();
     $this->sidebar = JHtmlSidebar::render();
     parent::display($tpl);
 }
开发者ID:klas,项目名称:joomla-cms,代码行数:34,代码来源:view.html.php


示例10: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     JRequest::setVar('hidemainmenu', 1);
     $user = JFactory::getUser();
     $isNew = $this->item->id == 0;
     $canDo = UsersHelper::getActions();
     JToolBarHelper::title(JText::_($isNew ? 'COM_USERS_VIEW_NEW_GROUP_TITLE' : 'COM_USERS_VIEW_EDIT_GROUP_TITLE'), 'groups-add');
     if ($canDo->get('core.edit') || $canDo->get('core.create')) {
         JToolBarHelper::apply('group.apply');
         JToolBarHelper::save('group.save');
     }
     if ($canDo->get('core.create')) {
         JToolBarHelper::save2new('group.save2new');
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         JToolBarHelper::save2copy('group.save2copy');
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('group.cancel');
     } else {
         JToolBarHelper::cancel('group.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('JHELP_USERS_GROUPS_EDIT');
 }
开发者ID:acculitx,项目名称:fleetmatrixsite,代码行数:31,代码来源:view.html.php


示例11: _setToolbar

 /**
  * Setup the Toolbar.
  */
 protected function _setToolbar()
 {
     $canDo = UsersHelper::getActions();
     JToolBarHelper::title(JText::_('Users_View_Users_Title'), 'user');
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::custom('users.activate', 'publish.png', 'publish_f2.png', 'Activate', true);
         JToolBarHelper::custom('users.block', 'unpublish.png', 'unpublish_f2.png', 'Block', true);
         JToolBarHelper::divider();
     }
     if ($canDo->get('core.create')) {
         JToolBarHelper::custom('user.add', 'new.png', 'new_f2.png', 'New', false);
     }
     if ($canDo->get('core.edit')) {
         JToolBarHelper::custom('user.edit', 'edit.png', 'edit_f2.png', 'Edit', true);
     }
     if ($canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'users.delete');
     }
     JToolBarHelper::divider();
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_users');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('screen.users.users');
 }
开发者ID:joebushi,项目名称:joomla,代码行数:28,代码来源:view.html.php


示例12: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     $canDo = UsersHelper::getActions();
     JToolbarHelper::title(JText::_('COM_USERS_VIEW_USERS_TITLE'), 'user');
     if ($canDo->get('core.create')) {
         JToolbarHelper::addNew('user.add');
     }
     if ($canDo->get('core.edit')) {
         JToolbarHelper::editList('user.edit');
     }
     if ($canDo->get('core.edit.state')) {
         JToolbarHelper::divider();
         JToolbarHelper::publish('users.activate', 'COM_USERS_TOOLBAR_ACTIVATE', true);
         JToolbarHelper::unpublish('users.block', 'COM_USERS_TOOLBAR_BLOCK', true);
         JToolbarHelper::custom('users.unblock', 'unblock.png', 'unblock_f2.png', 'COM_USERS_TOOLBAR_UNBLOCK', true);
         JToolbarHelper::divider();
     }
     if ($canDo->get('core.delete')) {
         JToolbarHelper::deleteList('', 'users.delete');
         JToolbarHelper::divider();
     }
     if ($canDo->get('core.admin')) {
         JToolbarHelper::preferences('com_users');
         JToolbarHelper::divider();
     }
     JToolbarHelper::help('JHELP_USERS_USER_MANAGER');
     JHtmlSidebar::setAction('index.php?option=com_users&view=users');
     JHtmlSidebar::addFilter(JText::_('COM_USERS_FILTER_STATE'), 'filter_state', JHtml::_('select.options', UsersHelper::getStateOptions(), 'value', 'text', $this->state->get('filter.state')));
     JHtmlSidebar::addFilter(JText::_('COM_USERS_FILTER_ACTIVE'), 'filter_active', JHtml::_('select.options', UsersHelper::getActiveOptions(), 'value', 'text', $this->state->get('filter.active')));
     JHtmlSidebar::addFilter(JText::_('COM_USERS_FILTER_USERGROUP'), 'filter_group_id', JHtml::_('select.options', UsersHelper::getGroups(), 'value', 'text', $this->state->get('filter.group_id')));
     JHtmlSidebar::addFilter(JText::_('COM_USERS_OPTION_FILTER_DATE'), 'filter_range', JHtml::_('select.options', Usershelper::getRangeOptions(), 'value', 'text', $this->state->get('filter.range')));
 }
开发者ID:RuDers,项目名称:JoomlaSQL,代码行数:37,代码来源:view.html.php


示例13: addToolbar

 function addToolbar()
 {
     JToolBarHelper::title(JText::_('EXPORT TAGS TO OTHER COMPONENTS'), 'tag.png');
     $canDo = UsersHelper::getActions();
     if ($canDo->get('core.create')) {
         $bar = JToolBar::getInstance('toolbar');
         $bar->appendButton('Confirm', JText::_('Are you sure you want to export?'), 'default', JText::_('Export'), 'export', false);
         JToolBarHelper::spacer();
     }
     JToolBarHelper::back(JText::_('CEDTAG_CONTROL_PANEL'), 'index.php?option=com_cedtag');
 }
开发者ID:lautarodragan,项目名称:ideary,代码行数:11,代码来源:view.html.php


示例14: prepareValueForDisplay

 public function prepareValueForDisplay($value, $field)
 {
     $value = (array) $value;
     JLoader::register('UsersHelper', JPATH_ADMINISTRATOR . '/components/com_users/helpers/users.php');
     $texts = array();
     foreach (UsersHelper::getGroups() as $group) {
         if (in_array($group->value, $value)) {
             $texts[] = parent::prepareValueForDisplay(trim($group->text, '- '), $field);
         }
     }
     return parent::prepareValueForDisplay($texts, $field);
 }
开发者ID:beingsane,项目名称:DPFields,代码行数:12,代码来源:usergrouplist.php


示例15: tfaEnabled

 /**
  * Check if the two factor authentication by Joomla! is enabled
  */
 public static function tfaEnabled()
 {
     //tfa is not supported before 3.2
     if (version_compare(JVERSION, '3.2', '<')) {
         return false;
     }
     //check for two way authentication
     require_once JPATH_ADMINISTRATOR . '/components/com_users/helpers/users.php';
     $tfa = UsersHelper::getTwoFactorMethods();
     if (isset($tfa) && is_array($tfa) && count($tfa) > 1) {
         return true;
     }
     return false;
 }
开发者ID:joshjim27,项目名称:jobsglobal,代码行数:17,代码来源:system.php


示例16: display

 /**
  * Display the view
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  void
  */
 public function display($tpl = null)
 {
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     $this->state = $this->get('State');
     UsersHelper::addSubmenu('levels');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     $this->addToolbar();
     $this->sidebar = JHtmlSidebar::render();
     parent::display($tpl);
 }
开发者ID:educakanchay,项目名称:kanchay,代码行数:22,代码来源:view.html.php


示例17: canView

 /**
  * Checks whether a user can see this view.
  *
  * @param	string	$view	The view name.
  *
  * @return	boolean
  * @since	1.6
  */
 protected function canView($view)
 {
     $canDo = UsersHelper::getActions();
     switch ($view) {
         // Special permissions.
         case 'groups':
         case 'group':
         case 'levels':
         case 'level':
             return $canDo->get('core.admin');
             break;
             // Default permissions.
         // Default permissions.
         default:
             return true;
     }
 }
开发者ID:RuDers,项目名称:JoomlaSQL,代码行数:25,代码来源:controller.php


示例18: display

 /**
  * Execute and display a template script.
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  mixed   A string if successful, otherwise an Error object.
  *
  * @since   1.6
  */
 public function display($tpl = null)
 {
     // Get the view data.
     $this->data = $this->get('Data');
     $this->form = $this->get('Form');
     $this->state = $this->get('State');
     $this->params = $this->state->get('params');
     $this->twofactorform = $this->get('Twofactorform');
     $this->twofactormethods = UsersHelper::getTwoFactorMethods();
     $this->otpConfig = $this->get('OtpConfig');
     $this->db = JFactory::getDbo();
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode('<br />', $errors));
         return false;
     }
     // View also takes responsibility for checking if the user logged in with remember me.
     $user = JFactory::getUser();
     $cookieLogin = $user->get('cookieLogin');
     if (!empty($cookieLogin)) {
         // If so, the user must login to edit the password and other data.
         // What should happen here? Should we force a logout which destroys the cookies?
         $app = JFactory::getApplication();
         $app->enqueueMessage(JText::_('JGLOBAL_REMEMBER_MUST_LOGIN'), 'message');
         $app->redirect(JRoute::_('index.php?option=com_users&view=login', false));
         return false;
     }
     // Check if a user was found.
     if (!$this->data->id) {
         JError::raiseError(404, JText::_('JERROR_USERS_PROFILE_NOT_FOUND'));
         return false;
     }
     $this->data->tags = new JHelperTags();
     $this->data->tags->getItemTags('com_users.user.', $this->data->id);
     // Check for layout override
     $active = JFactory::getApplication()->getMenu()->getActive();
     if (isset($active->query['layout'])) {
         $this->setLayout($active->query['layout']);
     }
     // Escape strings for HTML output
     $this->pageclass_sfx = htmlspecialchars($this->params->get('pageclass_sfx'));
     $this->prepareDocument();
     return parent::display($tpl);
 }
开发者ID:joomla-projects,项目名称:media-manager-improvement,代码行数:53,代码来源:view.html.php


示例19: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     JRequest::setVar('hidemainmenu', 1);
     $user = JFactory::getUser();
     $isNew = $this->item->id == 0;
     $canDo = UsersHelper::getActions();
     $isNew = $this->item->id == 0;
     $isProfile = $this->item->id == $user->id;
     JToolBarHelper::title(JText::_($isNew ? 'COM_USERS_VIEW_NEW_USER_TITLE' : ($isProfile ? 'COM_USERS_VIEW_EDIT_PROFILE_TITLE' : 'User Manager: Edit User')), $isNew ? 'user-add' : ($isProfile ? 'user-profile' : 'user-edit'));
     if ($canDo->get('core.edit') || $canDo->get('core.create')) {
         JToolBarHelper::apply('user.apply');
         JToolBarHelper::save('user.save');
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('user.cancel');
     } else {
         JToolBarHelper::cancel('user.cancel', 'JTOOLBAR_CLOSE');
     }
 }
开发者ID:ngxuanmui,项目名称:hp3,代码行数:24,代码来源:view.html.php


示例20: display

 /**
  * Display the view
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  void
  */
 public function display($tpl = null)
 {
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     $this->state = $this->get('State');
     $this->filterForm = $this->get('FilterForm');
     $this->activeFilters = $this->get('ActiveFilters');
     $this->canDo = JHelperContent::getActions('com_users');
     UsersHelper::addSubmenu('users');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     // Include the component HTML helpers.
     JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
     $this->addToolbar();
     $this->sidebar = JHtmlSidebar::render();
     parent::display($tpl);
 }
开发者ID:grlf,项目名称:eyedock,代码行数:27,代码来源:view.html.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP UsersHelperRoute类代码示例发布时间:2022-05-23
下一篇:
PHP Users类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap