本文整理汇总了PHP中JToolbarHelper::link方法的典型用法代码示例。如果您正苦于以下问题:PHP JToolbarHelper::link方法的具体用法?PHP JToolbarHelper::link怎么用?PHP JToolbarHelper::link使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JToolbarHelper
的用法示例。
在下文中一共展示了JToolbarHelper::link方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addToolbar
protected function addToolbar()
{
JFactory::getApplication()->input->set('hidemainmenu', true);
$user = JFactory::getUser();
$userId = $user->get('id');
$bar = JToolBar::getInstance();
$canDo = JHelperContent::getActions('com_tz_portfolio_plus');
$checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $userId);
$text = JText::_($this->item->name);
if ($this->getLayout() == 'upload') {
$text = JText::_('COM_TZ_PORTFOLIO_PLUS_UPLOAD_AND_INSTALL_ADDON');
}
if ($this->getLayout() == 'manager') {
$text = JText::_($this->item->name) . ': Manager Data';
}
JToolBarHelper::title(JText::sprintf('COM_TZ_PORTFOLIO_PLUS_ADDONS_MANAGER_TASK', $text), 'puzzle');
if ($this->getLayout() == 'edit') {
// If not checked out, can save the item.
if (!$checkedOut) {
if ($canDo->get('core.edit')) {
JToolBarHelper::apply('addon.apply');
JToolBarHelper::save('addon.save');
}
}
}
if ($this->getLayout() == 'edit' && $this->item->data_manager) {
JToolbarHelper::link(JRoute::_(TZ_Portfolio_PlusHelperAddon_Datas::getRootURL($this->item->id)), JText::_('COM_TZ_PORTFOLIO_PLUS_ADDON_DATA_MANAGER'), 'book');
}
if ($this->getLayout() != 'manager') {
JToolBarHelper::cancel('addon.cancel', JText::_('JTOOLBAR_CLOSE'));
JToolBarHelper::divider();
} else {
JToolbarHelper::custom('addon.cancel', 'puzzle', '', JText::_('COM_TZ_PORTFOLIO_PLUS_ADDONS_MANAGER'), false);
}
JToolBarHelper::help('JHELP_CONTENT_ARTICLE_MANAGER', false, 'http://wiki.templaza.com/TZ_Portfolio_Plus_v3:Administration#How_to_Add_or_Edit_3');
// Special HTML workaround to get send popup working
$docClass = ' class="btn btn-small"';
$youtubeIcon = '<i class="tz-icon-youtube tz-icon-14"></i> ';
$wikiIcon = '<i class="tz-icon-wikipedia tz-icon-14"></i> ';
$youtubeTitle = JText::_('COM_TZ_PORTFOLIO_PLUS_VIDEO_TUTORIALS');
$wikiTitle = JText::_('COM_TZ_PORTFOLIO_PLUS_WIKIPEDIA_TUTORIALS');
$videoTutorial = '<a' . $docClass . ' onclick="Joomla.popupWindow(\'http://www.youtube.com/channel/UCykS6SX6L2GOI-n3IOPfTVQ/videos\', \'' . $youtubeTitle . '\', 800, 500, 1)"' . ' href="#">' . $youtubeIcon . $youtubeTitle . '</a>';
$wikiTutorial = '<a' . $docClass . ' onclick="Joomla.popupWindow(\'http://wiki.templaza.com/Main_Page\', \'' . $wikiTitle . '\', 800, 500, 1)"' . ' href="#">' . $wikiIcon . $wikiTitle . '</a>';
$bar->appendButton('Custom', $videoTutorial, 'youtube');
$bar->appendButton('Custom', $wikiTutorial, 'wikipedia');
}
示例2: addToolbar
/**
* Setup the Toolbar
*
* @return void
*
* @since 1.6
*/
protected function addToolbar()
{
JToolbarHelper::title(JText::_('COM_ADMIN_SYSTEM_INFORMATION'), 'info-2 systeminfo');
JToolbarHelper::link(JRoute::_('index.php?option=com_admin&view=sysinfo&format=text'), 'COM_ADMIN_DOWNLOAD_SYSTEM_INFORMATION_TEXT', 'download');
JToolbarHelper::link(JRoute::_('index.php?option=com_admin&view=sysinfo&format=json'), 'COM_ADMIN_DOWNLOAD_SYSTEM_INFORMATION_JSON', 'download');
JToolbarHelper::help('JHELP_SITE_SYSTEM_INFORMATION');
}