english/administrator/components/com_modules/views/modules/view.html.php
/**
	 * Add the page title and toolbar.
	 *
	 * @since	1.6
	 */
Add the page title and toolbar.
Add the page title and toolbar .
protected function addToolbar()
	{
		$state	= $this->get('State');
		$canDo	= ModulesHelper::getActions();
		JToolBarHelper::title(JText::_('COM_MODULES_MANAGER_MODULES'), 'module.png');
		if ($canDo->get('core.create')) {
			$bar = JToolBar::getInstance('toolbar');
			$bar->appendButton('Popup', 'new', 'JTOOLBAR_NEW', 'index.php?option=com_modules&amp;view=select&amp;tmpl=component', 850, 400);
		}
		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::divider();
			JToolBarHelper::publish('modules.publish', 'JTOOLBAR_PUBLISH', true);
			JToolBarHelper::unpublish('modules.unpublish', 'JTOOLBAR_UNPUBLISH', true);
			JToolBarHelper::divider();
			JToolBarHelper::checkin('modules.checkin');
		}
		if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
			JToolBarHelper::deleteList('', 'modules.delete', 'JTOOLBAR_EMPTY_TRASH');
			JToolBarHelper::divider();
		} else if ($canDo->get('core.edit.state')) {
			JToolBarHelper::trash('modules.trash');
			JToolBarHelper::divider();
		}
		if ($canDo->get('core.admin')) {
			JToolBarHelper::preferences('com_modules');
			JToolBarHelper::divider();
		}
		JToolBarHelper::help('JHELP_EXTENSIONS_MODULE_MANAGER');
	}
protected function addToolbar ( ) { $ state = $ this -> get ( 'State' ) ; $ canDo = ModulesHelper :: getActions ( ) ; JToolBarHelper :: title ( JText :: _ ( 'COM_MODULES_MANAGER_MODULES' ) , 'module.png' ) ; if ( $ canDo -> get ( 'core.create' ) ) { $ bar = JToolBar :: getInstance ( 'toolbar' ) ; $ bar -> appendButton ( 'Popup' , 'new' , 'JTOOLBAR_NEW' , 'index.php?option=com_modules&amp;view=select&amp;tmpl=component' , 850 , 400 ) ; } 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 :: divider ( ) ; JToolBarHelper :: publish ( 'modules.publish' , 'JTOOLBAR_PUBLISH' , true ) ; JToolBarHelper :: unpublish ( 'modules.unpublish' , 'JTOOLBAR_UNPUBLISH' , true ) ; JToolBarHelper :: divider ( ) ; JToolBarHelper :: checkin ( 'modules.checkin' ) ; } if ( $ state -> get ( 'filter.state' ) == - 2 && $ canDo -> get ( 'core.delete' ) ) { JToolBarHelper :: deleteList ( '' , 'modules.delete' , 'JTOOLBAR_EMPTY_TRASH' ) ; JToolBarHelper :: divider ( ) ; } else if ( $ canDo -> get ( 'core.edit.state' ) ) { JToolBarHelper :: trash ( 'modules.trash' ) ; JToolBarHelper :: divider ( ) ; } if ( $ canDo -> get ( 'core.admin' ) ) { JToolBarHelper :: preferences ( 'com_modules' ) ; JToolBarHelper :: divider ( ) ; } JToolBarHelper :: help ( 'JHELP_EXTENSIONS_MODULE_MANAGER' ) ; }
Add the page title and toolbar.
Add the page title and toolbar .
//JToolBarHelper::addNew('module.add');