本文整理汇总了PHP中JToolBarHelper::unpublish方法的典型用法代码示例。如果您正苦于以下问题:PHP JToolBarHelper::unpublish方法的具体用法?PHP JToolBarHelper::unpublish怎么用?PHP JToolBarHelper::unpublish使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JToolBarHelper
的用法示例。
在下文中一共展示了JToolBarHelper::unpublish方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addToolbar
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
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::addNew('module.add');
JToolBarHelper::divider();
$bar = JToolBar::getInstance('toolbar');
$bar->appendButton('Popup', 'options', 'COM_MESSAGES_TOOLBAR_MY_SETTINGS', 'index.php?option=com_messages&view=config&tmpl=component', 850, 400);
if ($canDo->get('core.admin')) {
JToolBarHelper::preferences('com_messages');
}
JToolBarHelper::divider();
JToolBarHelper::help('JHELP_COMPONENTS_MESSAGING_INBOX');
}
示例2: addToolbar
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
$canDo = UsersHelper::getActions();
JToolBarHelper::title(JText::_('COM_USERS_VIEW_USERS_TITLE'), 'user');
if ($canDo->get('core.create')) {
JToolBarHelper::addNew('user.add');
}
if ($canDo->get('core.edit')) {
JToolBarHelper::editList('user.edit');
}
if ($canDo->get('core.edit.state')) {
JToolBarHelper::divider();
JToolBarHelper::publish('users.activate', 'COM_USERS_TOOLBAR_ACTIVATE', true);
JToolBarHelper::unpublish('users.block', 'COM_USERS_TOOLBAR_BLOCK', true);
JToolBarHelper::custom('users.unblock', 'unblock.png', 'unblock_f2.png', 'COM_USERS_TOOLBAR_UNBLOCK', true);
JToolBarHelper::divider();
}
if ($canDo->get('core.delete')) {
JToolBarHelper::deleteList('', 'users.delete');
JToolBarHelper::divider();
}
if ($canDo->get('core.admin')) {
JToolBarHelper::preferences('com_users');
JToolBarHelper::divider();
}
JToolBarHelper::help('JHELP_USERS_USER_MANAGER');
}
示例3: addToolbar
protected function addToolbar()
{
$canDo = Bt_SocialconnectAdminHelper::getActions($this->state->get('filter.category_id'));
$user = JFactory::getUser();
JToolBarHelper::title(JText::_('COM_BT_SOCIALCONNECT_WIDGETS_MANAGER_TITLE'), 'widgeteven.png');
$bar = JToolBar::getInstance();
//JToolBarHelper::custom('installext', 'install', '', 'Install', false);
//JToolBarHelper::custom('uninstallext', 'uninstall', '', 'Uninstall', false);
if ($canDo->get('core.create')) {
$bar = JToolBar::getInstance('toolbar');
$bar->appendButton('Popup', 'new', 'JTOOLBAR_NEW', 'index.php?option=com_bt_socialconnect&view=select&tmpl=component', 650, 250);
}
if ($canDo->get('core.edit.state')) {
JToolBarHelper::divider();
JToolBarHelper::publish('widgets.publish', 'JTOOLBAR_PUBLISH', true);
JToolBarHelper::unpublish('widgets.unpublish', 'JTOOLBAR_UNPUBLISH', true);
JToolBarHelper::divider();
}
if ($canDo->get('core.edit') || $canDo->get('core.edit.own')) {
JToolBarHelper::editList('widget.edit');
}
if ($canDo->get('core.delete')) {
JToolBarHelper::deleteList('', 'widgets.delete');
JToolBarHelper::divider();
}
if ($canDo->get('core.admin')) {
JToolBarHelper::preferences('com_bt_socialconnect');
JToolBarHelper::divider();
}
}
示例4: addToolbar
protected function addToolbar()
{
$bar = JToolBar::getInstance();
JToolBarHelper::title(JText::_('COM_TZ_PORTFOLIO_PLUS_TAGS_MANAGER'), 'tags');
JToolBarHelper::addNew('tag.add');
JToolBarHelper::editList('tag.edit');
JToolBarHelper::divider();
JToolBarHelper::publish('tags.publish', 'JTOOLBAR_PUBLISH', true);
JToolBarHelper::unpublish('tags.unpublish', 'JTOOLBAR_UNPUBLISH', true);
JToolBarHelper::deleteList(JText::_('COM_TZ_PORTFOLIO_PLUS_QUESTION_DELETE'), 'tags.delete');
JToolBarHelper::divider();
JToolBarHelper::preferences('com_tz_portfolio_plus');
JToolBarHelper::divider();
$doc = JFactory::getDocument();
// If the joomla is version 3.0
if (COM_TZ_PORTFOLIO_PLUS_JVERSION_COMPARE) {
$doc->addStyleSheet(JURI::base(true) . '/components/com_tz_portfolio_plus/fonts/font-awesome-4.5.0/css/font-awesome.min.css');
}
$doc->addStyleSheet(JURI::base(true) . '/components/com_tz_portfolio_plus/css/style.min.css');
JToolBarHelper::help('JHELP_CONTENT_ARTICLE_MANAGER', false, 'http://wiki.templaza.com/TZ_Portfolio_Plus_v3:Administration#Tags');
// 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');
$state = array('P' => JText::_('JPUBLISHED'), 'U' => JText::_('JUNPUBLISHED'));
JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_state', JHtml::_('select.options', $state, 'value', 'text', $this->state->filter_state));
}
示例5: addToolBar
/**
* Setting the toolbar
*/
protected function addToolBar()
{
JToolBarHelper::addNew('portfolio.add');
JToolBarHelper::editList('portfolio.edit');
JToolBarHelper::custom('portfolios.rebuild', 'refresh.png', 'refresh_f2.png', 'COM_BT_PORTFOLIO_PORTFOLIOS_REBUILD_IMAGES', false);
JToolBarHelper::divider();
JToolBarHelper::title(JText::_('COM_BT_PORTFOLIO_PORTFOLIOS_MANAGER'), 'portfolio.png');
JToolBarHelper::publish('portfolios.publish', 'JTOOLBAR_PUBLISH', true);
JToolBarHelper::unpublish('portfolios.unpublish', 'JTOOLBAR_UNPUBLISH', true);
JToolBarHelper::custom('portfolios.featured', 'featured.png', 'featured_f2.png', 'JFEATURED', true);
JToolBarHelper::divider();
JToolBarHelper::checkin('portfolios.checkin');
JToolBarHelper::deleteList('', 'portfolios.delete');
JToolBarHelper::preferences('com_bt_portfolio');
$this->sidebar = '';
Bt_portfolioHelper::addSubmenu(JRequest::getCmd('view', 'cpanel'));
//added since 2.0 for j3.0
if (!$this->legacy) {
JHtmlSidebar::setAction('index.php?option=com_bt_portfolio&view=portfolios');
JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_published', JHtml::_('select.options', Bt_portfolioHelper::getPublishedOptions(), 'value', 'text', $this->state->get('filter.published'), true));
JHtmlSidebar::addFilter(JText::_('COM_BT_PORTFOLIO_SELECT_FEATURED'), 'filter_featured', JHtml::_('select.options', Bt_portfolioHelper::getFeaturedOptions(), 'value', 'text', $this->state->get('filter.featured'), true));
JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_CATEGORY'), 'filter_catid', JHtml::_('select.options', Bt_portfolioHelper::getCategoryOptions(), 'value', 'text', $this->state->get('filter.catid')));
JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_ACCESS'), 'filter_access', JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')));
JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_LANGUAGE'), 'filter_language', JHtml::_('select.options', JHtml::_('contentlanguage.existing', true, true), 'value', 'text', $this->state->get('filter.language')));
$this->sidebar = JHtmlSidebar::render();
}
}
示例6: addButton
public static function addButton()
{
$task = JRequest::getVar('task');
$controller = JRequest::getVar('controller');
switch (strtoupper($controller)) {
case 'LOAINHA':
$title = 'Loại nhà';
break;
case 'CAPCONGTRINH':
$title = 'Cấp công trình';
break;
case 'TAISAN':
$title = 'Tài sản';
break;
default:
$title = '';
break;
}
switch ($task) {
case 'add':
case 'edit':
JToolBarHelper::save('save', 'Lưu và đóng');
JToolBarHelper::cancel('cancel', 'Huỷ bỏ');
break;
default:
JToolBarHelper::title(JText::_('Danh mục ' . $title . ': [Danh sách]'), 'generic.png');
JToolBarHelper::addNew('add', 'Thêm mới');
JToolBarHelper::deleteList(null, 'remove', 'Xóa');
JToolBarHelper::publish('publish', 'Bật trạng thái');
JToolBarHelper::unpublish('unpublish', 'Tắt trạng thái');
break;
}
}
示例7: addToolbar
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
$state = $this->get('State');
$canDo = ContentHelper::getActions($this->state->get('filter.category_id'));
JToolBarHelper::title(JText::_('COM_CONTENT_FEATURED_TITLE'), 'featured.png');
if ($canDo->get('core.create')) {
JToolBarHelper::addNew('article.add');
}
if ($canDo->get('core.edit')) {
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::divider();
JToolBarHelper::archiveList('articles.archive');
JToolBarHelper::checkin('articles.checkin');
JToolBarHelper::custom('featured.delete', 'remove.png', 'remove_f2.png', 'JTOOLBAR_REMOVE', true);
}
if ($state->get('filter.published') == -2 && $canDo->get('core.delete')) {
JToolBarHelper::deleteList('', 'articles.delete', 'JTOOLBAR_EMPTY_TRASH');
JToolBarHelper::divider();
} elseif ($canDo->get('core.edit.state')) {
JToolBarHelper::divider();
JToolBarHelper::trash('articles.trash');
}
if ($canDo->get('core.admin')) {
JToolBarHelper::preferences('com_content');
JToolBarHelper::divider();
}
JToolBarHelper::help('JHELP_CONTENT_FEATURED_ARTICLES');
}
示例8: addToolbar
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
require_once JPATH_COMPONENT . '/helpers/banners.php';
$canDo = BannersHelper::getActions();
JToolBarHelper::title(JText::_('COM_BANNERS_MANAGER_CLIENTS'), 'banners-clients.png');
if ($canDo->get('core.create')) {
JToolBarHelper::addNew('client.add');
}
if ($canDo->get('core.edit')) {
JToolBarHelper::editList('client.edit');
}
if ($canDo->get('core.edit.state')) {
JToolBarHelper::divider();
JToolBarHelper::publish('clients.publish', 'JTOOLBAR_PUBLISH', true);
JToolBarHelper::unpublish('clients.unpublish', 'JTOOLBAR_UNPUBLISH', true);
JToolBarHelper::divider();
JToolBarHelper::archiveList('clients.archive');
JToolBarHelper::checkin('clients.checkin');
}
if ($this->state->get('filter.state') == -2 && $canDo->get('core.delete')) {
JToolBarHelper::deleteList('', 'clients.delete', 'JTOOLBAR_EMPTY_TRASH');
JToolBarHelper::divider();
} elseif ($canDo->get('core.edit.state')) {
JToolBarHelper::trash('clients.trash');
JToolBarHelper::divider();
}
if ($canDo->get('core.admin')) {
JToolBarHelper::preferences('com_banners');
JToolBarHelper::divider();
}
JToolBarHelper::help('JHELP_COMPONENTS_BANNERS_CLIENTS');
}
示例9: addToolbar
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
require_once JPATH_COMPONENT . '/helpers/j2xml.php';
$canDo = J2XMLHelper::getActions();
$doc = JFactory::getDocument();
$icon_48_websites = " .icon-48-websites {background:url(../media/com_j2xml/images/icon-48-websites.png) no-repeat; }";
$doc->addStyleDeclaration($icon_48_websites);
JToolBarHelper::title(JText::_('COM_J2XML_MANAGER_WEBSITES'), 'websites.png');
if ($canDo->get('core.create')) {
JToolBarHelper::addNew('website.add');
}
if ($canDo->get('core.edit')) {
JToolBarHelper::editList('website.edit');
}
if ($canDo->get('core.edit.state')) {
JToolBarHelper::divider();
JToolBarHelper::publish('websites.publish', 'JTOOLBAR_PUBLISH', true);
JToolBarHelper::unpublish('websites.unpublish', 'JTOOLBAR_UNPUBLISH', true);
JToolBarHelper::divider();
JToolBarHelper::checkin('websites.checkin');
}
if ($this->state->get('filter.state') == -2 && $canDo->get('core.delete')) {
JToolBarHelper::deleteList('', 'websites.delete', 'JTOOLBAR_EMPTY_TRASH');
} elseif ($canDo->get('core.edit.state')) {
JToolBarHelper::trash('websites.trash');
}
}
示例10: addToolBar
/**
* Setting the toolbar
*/
protected function addToolBar()
{
$canDo = ZhYandexMapHelper::getPathActions();
JToolBarHelper::title(JText::_('COM_ZHYANDEXMAP_MAPPATH_MANAGER'), 'mappath');
if ($canDo->get('core.create')) {
JToolBarHelper::addNew('mappath.add', 'JTOOLBAR_NEW');
}
if ($canDo->get('core.edit')) {
JToolBarHelper::editList('mappath.edit', 'JTOOLBAR_EDIT');
}
if ($canDo->get('core.edit.state')) {
JToolBarHelper::divider();
JToolBarHelper::publish('mappaths.publish', 'JTOOLBAR_PUBLISH', true);
JToolBarHelper::unpublish('mappaths.unpublish', 'JTOOLBAR_UNPUBLISH', true);
JToolBarHelper::divider();
}
if ($canDo->get('core.delete')) {
JToolBarHelper::deleteList('', 'mappaths.delete', 'JTOOLBAR_DELETE');
}
if ($canDo->get('core.admin')) {
JToolBarHelper::divider();
JToolBarHelper::preferences('com_zhyandexmap');
}
JHtmlSidebar::setAction('index.php?option=com_zhyandexmap');
JHtmlSidebar::addFilter(JText::_('COM_ZHYANDEXMAP_MAPMARKER_FILTER_MAP'), 'filter_mapid', JHtml::_('select.options', $this->mapList, 'value', 'text', $this->state->get('filter.mapid')));
JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_published', JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true));
JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_CATEGORY'), 'filter_category_id', JHtml::_('select.options', JHtml::_('category.options', 'com_zhyandexmap'), 'value', 'text', $this->state->get('filter.category_id')));
$this->sidebar = JHtmlSidebar::render();
}
示例11: addButton
public static function addButton()
{
$task = JRequest::getVar('task');
$controller = JRequest::getVar('controller');
switch ($task) {
case 'add':
JToolBarHelper::title('Thêm mới ' . JText::_(strtoupper($controller)), 'generic.png');
case 'edit':
JToolBarHelper::title('Hiệu chỉnh ' . JText::_(strtoupper($controller)), 'generic.png');
JToolBarHelper::save();
JToolBarHelper::cancel('cancel', 'Hủy bỏ');
break;
case 'configdot':
JToolBarHelper::title('Cấu hình đợt - kiến nghị ' . JText::_(strtoupper($controller)), 'generic.png');
JToolBarHelper::custom('saveConfigdot', 'save', '', 'Lưu và thoát', false, false);
JToolBarHelper::cancel('cancel', 'Hủy bỏ');
break;
default:
JToolBarHelper::addNew();
JToolBarHelper::deleteList('Bạn chắc chắn muốn xóa dữ liệu đã chọn !');
JToolBarHelper::publish();
JToolBarHelper::unpublish();
break;
}
// }
}
示例12: addToolbar
protected function addToolbar()
{
JToolBarHelper::publish('sites.publish', 'JTOOLBAR_ENABLE', true);
JToolBarHelper::unpublish('sites.unpublish', 'JTOOLBAR_DISABLE', true);
JToolBarHelper::divider();
parent::addToolbar();
}
示例13: display
function display($tpl = null)
{
//Load helpers
$this->loadHelper('currencydisplay');
$this->loadHelper('html');
// Get the data
$model = VmModel::getModel('product');
// Create filter
$this->addStandardDefaultViewLists($model);
$inventorylist = $model->getProductListing(false, false);
$pagination = $model->getPagination();
$this->assignRef('pagination', $pagination);
// Apply currency
$currencydisplay = CurrencyDisplay::getInstance();
foreach ($inventorylist as $virtuemart_product_id => $product) {
//TODO oculd be interesting to show the price for each product, and all stored ones $product->product_in_stock
$product->product_instock_value = $currencydisplay->priceDisplay($product->product_price, '', $product->product_in_stock, false);
$product->product_price_display = $currencydisplay->priceDisplay($product->product_price, '', 1, false);
$product->weigth_unit_display = ShopFunctions::renderWeightUnit($product->product_weight_uom);
}
$this->assignRef('inventorylist', $inventorylist);
$options = array();
$options[] = JHTML::_('select.option', '', JText::_('COM_VIRTUEMART_DISPLAY_STOCK') . ':');
$options[] = JHTML::_('select.option', 'stocklow', JText::_('COM_VIRTUEMART_STOCK_LEVEL_LOW'));
$options[] = JHTML::_('select.option', 'stockout', JText::_('COM_VIRTUEMART_STOCK_LEVEL_OUT'));
$this->lists['stockfilter'] = JHTML::_('select.genericlist', $options, 'search_type', 'onChange="document.adminForm.submit(); return false;"', 'value', 'text', JRequest::getVar('search_type'));
$this->lists['filter_product'] = JRequest::getVar('filter_product');
// $this->assignRef('lists', $lists);
/* Toolbar */
$this->SetViewTitle('PRODUCT_INVENTORY');
JToolBarHelper::publish();
JToolBarHelper::unpublish();
parent::display($tpl);
}
示例14: addToolbar
protected function addToolbar()
{
$canDo = LowFaresHelper::getActions();
JToolBarHelper::title(JText::_('COM_LOWFARES_LIST'), 'module.png');
if ($canDo->get('core.create')) {
JToolBarHelper::addNew('flights.add');
}
if ($canDo->get('core.edit')) {
JToolBarHelper::editList('flights.edit');
}
if ($canDo->get('core.edit.state')) {
JToolBarHelper::divider();
JToolBarHelper::publish('flights.publish', 'JTOOLBAR_PUBLISH', true);
JToolBarHelper::unpublish('flights.unpublish', 'JTOOLBAR_UNPUBLISH', true);
JToolBarHelper::divider();
JToolBarHelper::custom('', 'refresh.png', 'refresh_f2.png', 'JTOOLBAR_GETFARES', false);
}
if ($canDo->get('core.delete')) {
JToolBarHelper::divider();
JToolBarHelper::deleteList(JText::_('COM_LOWFARES_COMFIRM_DELETE'), 'flights.delete', 'JTOOLBAR_DELETE');
}
if ($canDo->get('core.admin')) {
JToolBarHelper::divider();
JToolBarHelper::preferences('com_lowfares');
}
}
示例15: addToolbar
/**
* Add the page title and toolbar.
*
* @return void
*
* @since 1.6
*/
protected function addToolbar()
{
require_once JPATH_COMPONENT . '/helpers/wedding.php';
$canDo = WeddingHelper::getActions($this->state->get('filter.category_id'));
$user = JFactory::getUser();
JToolBarHelper::title(JText::_('COM_WEDDING_MANAGER_STORIES'), 'stories.png');
if ($canDo->get('core.edit.state')) {
if ($this->state->get('filter.state') != 2) {
// JToolBarHelper::divider();
JToolBarHelper::publish('stories.publish', 'JTOOLBAR_PUBLISH', true);
JToolBarHelper::unpublish('stories.unpublish', 'JTOOLBAR_UNPUBLISH', true);
}
if ($this->state->get('filter.state') != -1) {
JToolBarHelper::divider();
if ($this->state->get('filter.state') != 2) {
JToolBarHelper::archiveList('stories.archive');
} elseif ($this->state->get('filter.state') == 2) {
JToolBarHelper::unarchiveList('stories.publish');
}
}
}
if ($canDo->get('core.edit.state')) {
JToolBarHelper::checkin('stories.checkin');
}
if ($this->state->get('filter.state') == -2 && $canDo->get('core.delete')) {
JToolBarHelper::deleteList('', 'stories.delete', 'JTOOLBAR_EMPTY_TRASH');
JToolBarHelper::divider();
} elseif ($canDo->get('core.edit.state')) {
JToolBarHelper::trash('stories.trash');
JToolBarHelper::divider();
}
if ($canDo->get('core.admin')) {
JToolBarHelper::preferences('com_wedding');
}
}