english/administrator/components/com_messages/views/messages/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	= MessagesHelper::getActions();
		JToolBarHelper::title(JText::_('COM_MESSAGES_MANAGER_MESSAGES'), 'inbox.png');
		if ($canDo->get('core.create')) {
			JToolBarHelper::addNew('message.add');
		}
		if ($canDo->get('core.edit.state')) {
			JToolBarHelper::divider();
			JToolBarHelper::publish('messages.publish', 'COM_MESSAGES_TOOLBAR_MARK_AS_READ');
			JToolBarHelper::unpublish('messages.unpublish', 'COM_MESSAGES_TOOLBAR_MARK_AS_UNREAD');
		}
		if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
			JToolBarHelper::divider();
			JToolBarHelper::deleteList('', 'messages.delete','JTOOLBAR_EMPTY_TRASH');
		} else if ($canDo->get('core.edit.state')) {
			JToolBarHelper::divider();
			JToolBarHelper::trash('messages.trash');
		}
		JToolBarHelper::divider();
		$bar = JToolBar::getInstance('toolbar');
		$bar->appendButton('Popup', 'options', 'COM_MESSAGES_TOOLBAR_MY_SETTINGS', 'index.php?option=com_messages&amp;view=config&amp;tmpl=component', 850, 400);
		if ($canDo->get('core.admin')) {
			JToolBarHelper::preferences('com_messages');
		}
		JToolBarHelper::divider();
		JToolBarHelper::help('JHELP_COMPONENTS_MESSAGING_INBOX');
	}
protected function addToolbar ( ) { $ state = $ this -> get ( 'State' ) ; $ canDo = MessagesHelper :: getActions ( ) ; JToolBarHelper :: title ( JText :: _ ( 'COM_MESSAGES_MANAGER_MESSAGES' ) , 'inbox.png' ) ; if ( $ canDo -> get ( 'core.create' ) ) { JToolBarHelper :: addNew ( 'message.add' ) ; } if ( $ canDo -> get ( 'core.edit.state' ) ) { JToolBarHelper :: divider ( ) ; JToolBarHelper :: publish ( 'messages.publish' , 'COM_MESSAGES_TOOLBAR_MARK_AS_READ' ) ; JToolBarHelper :: unpublish ( 'messages.unpublish' , 'COM_MESSAGES_TOOLBAR_MARK_AS_UNREAD' ) ; } if ( $ state -> get ( 'filter.state' ) == - 2 && $ canDo -> get ( 'core.delete' ) ) { JToolBarHelper :: divider ( ) ; JToolBarHelper :: deleteList ( '' , 'messages.delete' , 'JTOOLBAR_EMPTY_TRASH' ) ; } else if ( $ canDo -> get ( 'core.edit.state' ) ) { JToolBarHelper :: divider ( ) ; JToolBarHelper :: trash ( 'messages.trash' ) ; } JToolBarHelper :: divider ( ) ; $ bar = JToolBar :: getInstance ( 'toolbar' ) ; $ bar -> appendButton ( 'Popup' , 'options' , 'COM_MESSAGES_TOOLBAR_MY_SETTINGS' , 'index.php?option=com_messages&amp;view=config&amp;tmpl=component' , 850 , 400 ) ; if ( $ canDo -> get ( 'core.admin' ) ) { JToolBarHelper :: preferences ( 'com_messages' ) ; } JToolBarHelper :: divider ( ) ; JToolBarHelper :: help ( 'JHELP_COMPONENTS_MESSAGING_INBOX' ) ; }
Add the page title and toolbar.
Add the page title and toolbar .
//JToolBarHelper::addNew('module.add');