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