english/administrator/components/com_content/views/articles/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()
	{
		$canDo	= ContentHelper::getActions($this->state->get('filter.category_id'));
		$user		= JFactory::getUser();
		JToolBarHelper::title(JText::_('COM_CONTENT_ARTICLES_TITLE'), 'article.png');
		if ($canDo->get('core.create') || (count($user->getAuthorisedCategories('com_content', 'core.create'))) > 0 ) {
			JToolBarHelper::addNew('article.add');
		}
		if (($canDo->get('core.edit')) || ($canDo->get('core.edit.own'))) {
			JToolBarHelper::editList('article.edit');
		}
		if ($canDo->get('core.edit.state')) {
			JToolBarHelper::divider();
			JToolBarHelper::publish('articles.publish', 'JTOOLBAR_PUBLISH', true);
			JToolBarHelper::unpublish('articles.unpublish', 'JTOOLBAR_UNPUBLISH', true);
			JToolBarHelper::custom('articles.featured', 'featured.png', 'featured_f2.png', 'JFEATURED', true);
			JToolBarHelper::divider();
			JToolBarHelper::archiveList('articles.archive');
			JToolBarHelper::checkin('articles.checkin');
		}
		if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) {
			JToolBarHelper::deleteList('', 'articles.delete','JTOOLBAR_EMPTY_TRASH');
			JToolBarHelper::divider();
		}
		else if ($canDo->get('core.edit.state')) {
			JToolBarHelper::trash('articles.trash');
			JToolBarHelper::divider();
		}
		if ($canDo->get('core.admin')) {
			JToolBarHelper::preferences('com_content');
			JToolBarHelper::divider();
		}
		JToolBarHelper::help('JHELP_CONTENT_ARTICLE_MANAGER');
	}
protected function addToolbar ( ) { $ canDo = ContentHelper :: getActions ( $ this -> state -> get ( 'filter.category_id' ) ) ; $ user = JFactory :: getUser ( ) ; JToolBarHelper :: title ( JText :: _ ( 'COM_CONTENT_ARTICLES_TITLE' ) , 'article.png' ) ; if ( $ canDo -> get ( 'core.create' ) || ( count ( $ user -> getAuthorisedCategories ( 'com_content' , 'core.create' ) ) ) > 0 ) { JToolBarHelper :: addNew ( 'article.add' ) ; } if ( ( $ canDo -> get ( 'core.edit' ) ) || ( $ canDo -> get ( 'core.edit.own' ) ) ) { JToolBarHelper :: editList ( 'article.edit' ) ; } if ( $ canDo -> get ( 'core.edit.state' ) ) { JToolBarHelper :: divider ( ) ; JToolBarHelper :: publish ( 'articles.publish' , 'JTOOLBAR_PUBLISH' , true ) ; JToolBarHelper :: unpublish ( 'articles.unpublish' , 'JTOOLBAR_UNPUBLISH' , true ) ; JToolBarHelper :: custom ( 'articles.featured' , 'featured.png' , 'featured_f2.png' , 'JFEATURED' , true ) ; JToolBarHelper :: divider ( ) ; JToolBarHelper :: archiveList ( 'articles.archive' ) ; JToolBarHelper :: checkin ( 'articles.checkin' ) ; } if ( $ this -> state -> get ( 'filter.published' ) == - 2 && $ canDo -> get ( 'core.delete' ) ) { JToolBarHelper :: deleteList ( '' , 'articles.delete' , 'JTOOLBAR_EMPTY_TRASH' ) ; JToolBarHelper :: divider ( ) ; } else if ( $ canDo -> get ( 'core.edit.state' ) ) { JToolBarHelper :: trash ( 'articles.trash' ) ; JToolBarHelper :: divider ( ) ; } if ( $ canDo -> get ( 'core.admin' ) ) { JToolBarHelper :: preferences ( 'com_content' ) ; JToolBarHelper :: divider ( ) ; } JToolBarHelper :: help ( 'JHELP_CONTENT_ARTICLE_MANAGER' ) ; }
Add the page title and toolbar.
Add the page title and toolbar .