• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP ContentHelper类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中ContentHelper的典型用法代码示例。如果您正苦于以下问题:PHP ContentHelper类的具体用法?PHP ContentHelper怎么用?PHP ContentHelper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了ContentHelper类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: _setToolbar

 /**
  * Display the toolbar
  */
 protected function _setToolbar()
 {
     $state = $this->get('State');
     $canDo = ContentHelper::getActions($state->get('filter.category_id'));
     JToolBarHelper::title(JText::_('Content_Articles_Title'), 'article.png');
     if ($canDo->get('core.create')) {
         JToolBarHelper::custom('article.add', 'new.png', 'new_f2.png', 'New', false);
     }
     if ($canDo->get('core.edit')) {
         JToolBarHelper::custom('article.edit', 'edit.png', 'edit_f2.png', 'Edit', true);
     }
     JToolBarHelper::divider();
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::custom('articles.publish', 'publish.png', 'publish_f2.png', 'Publish', true);
         JToolBarHelper::custom('articles.unpublish', 'unpublish.png', 'unpublish_f2.png', 'Unpublish', true);
         if ($state->get('filter.published') != -1) {
             JToolBarHelper::divider();
             JToolBarHelper::archiveList('articles.archive');
         }
     }
     if ($state->get('filter.published') == -2 && $canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'articles.delete');
     } else {
         if ($canDo->get('core.edit.state')) {
             JToolBarHelper::trash('articles.trash');
         }
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::divider();
         JToolBarHelper::preferences('com_content');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('screen.content.articles');
 }
开发者ID:joebushi,项目名称:joomla,代码行数:37,代码来源:view.html.php


示例2: display

 /**
  * Display the view
  */
 public function display($tpl = null)
 {
     // Include the component HTML helpers.
     JSNFactory::import('components.com_content.helpers.content');
     JSNFactory::import('components.com_content.helpers.html.contentadministrator');
     $JSNMedia = JSNFactory::getMedia();
     $JSNMedia->addStyleSheet(JSN_POWERADMIN_STYLE_URI . 'content.css');
     JSNHtmlAsset::addScript(JSN_POWERADMIN_LIB_JSNJS_URI . 'jsn.content.js');
     if ($this->getLayout() == 'pagebreak') {
         // TODO: This is really dogy - should change this one day.
         $eName = JRequest::getVar('e_name');
         $eName = preg_replace('#[^A-Z0-9\\-\\_\\[\\]]#i', '', $eName);
         $document = JFactory::getDocument();
         $document->setTitle(JText::_('COM_CONTENT_PAGEBREAK_DOC_TITLE'));
         $this->assignRef('eName', $eName);
         parent::display($tpl);
         return;
     }
     // Initialiase variables.
     $this->form = $this->get('Form');
     $this->item = $this->get('Item');
     $this->state = $this->get('State');
     $this->canDo = ContentHelper::getActions($this->state->get('filter.category_id'));
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     $language = JFactory::getLanguage();
     $language->load('com_content');
     parent::display($tpl);
 }
开发者ID:kleinhelmi,项目名称:tus03_j3_2015_01,代码行数:35,代码来源:view.html.php


示例3: 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::custom('article.add', 'new.png', 'new_f2.png', 'JTOOLBAR_NEW', false);
     }
     if ($canDo->get('core.edit')) {
         JToolBarHelper::custom('article.edit', 'edit.png', 'edit_f2.png', 'JTOOLBAR_EDIT', true);
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::divider();
         JToolBarHelper::custom('articles.publish', 'publish.png', 'publish_f2.png', 'JTOOLBAR_PUBLISH', true);
         JToolBarHelper::custom('articles.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true);
         JToolBarHelper::divider();
         JToolBarHelper::archiveList('articles.archive', 'JTOOLBAR_ARCHIVE');
         JToolBarHelper::custom('articles.checkin', 'checkin.png', 'checkin_f2.png', 'JTOOLBAR_CHECKIN', true);
         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();
     } else {
         if ($canDo->get('core.edit.state')) {
             JToolBarHelper::divider();
             JToolBarHelper::trash('articles.trash', 'JTOOLBAR_TRASH');
         }
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::preferences('com_content');
         JToolBarHelper::divider();
     }
     JToolBarHelper::help('JHELP_CONTENT_FEATURED_ARTICLES');
 }
开发者ID:akksi,项目名称:jcg,代码行数:40,代码来源:view.html.php


示例4: display

 /**
  * Display the view
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  void
  */
 public function display($tpl = null)
 {
     ContentHelper::addSubmenu('featured');
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     $this->state = $this->get('State');
     $this->authors = $this->get('Authors');
     $this->filterForm = $this->get('FilterForm');
     $this->activeFilters = $this->get('ActiveFilters');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     // Levels filter.
     $options = array();
     $options[] = JHtml::_('select.option', '1', JText::_('J1'));
     $options[] = JHtml::_('select.option', '2', JText::_('J2'));
     $options[] = JHtml::_('select.option', '3', JText::_('J3'));
     $options[] = JHtml::_('select.option', '4', JText::_('J4'));
     $options[] = JHtml::_('select.option', '5', JText::_('J5'));
     $options[] = JHtml::_('select.option', '6', JText::_('J6'));
     $options[] = JHtml::_('select.option', '7', JText::_('J7'));
     $options[] = JHtml::_('select.option', '8', JText::_('J8'));
     $options[] = JHtml::_('select.option', '9', JText::_('J9'));
     $options[] = JHtml::_('select.option', '10', JText::_('J10'));
     $this->f_levels = $options;
     $this->addToolbar();
     $this->sidebar = JHtmlSidebar::render();
     parent::display($tpl);
 }
开发者ID:deenison,项目名称:joomla-cms,代码行数:38,代码来源:view.html.php


示例5: 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'));
     Toolbar::title(Lang::txt('COM_CONTENT_FEATURED_TITLE'), 'featured.png');
     if ($canDo->get('core.create')) {
         Toolbar::addNew('article.add');
     }
     if ($canDo->get('core.edit')) {
         Toolbar::editList('article.edit');
     }
     if ($canDo->get('core.edit.state')) {
         Toolbar::divider();
         Toolbar::publish('articles.publish', 'JTOOLBAR_PUBLISH', true);
         Toolbar::unpublish('articles.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         Toolbar::divider();
         Toolbar::archiveList('articles.archive');
         Toolbar::checkin('articles.checkin');
         Toolbar::custom('featured.delete', 'remove.png', 'remove_f2.png', 'JTOOLBAR_REMOVE', true);
     }
     if ($state->get('filter.published') == -2 && $canDo->get('core.delete')) {
         Toolbar::deleteList('', 'articles.delete', 'JTOOLBAR_EMPTY_TRASH');
         Toolbar::divider();
     } elseif ($canDo->get('core.edit.state')) {
         Toolbar::divider();
         Toolbar::trash('articles.trash');
     }
     if ($canDo->get('core.admin')) {
         Toolbar::preferences('com_content');
         Toolbar::divider();
     }
     Toolbar::help('featured');
 }
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:38,代码来源:view.html.php


示例6: doBuild

 protected function doBuild(PageContext $ctxt, PageBuilderContext $builderCtxt, RequestArrayAdapter $requestParams, ArrayAdapter $buildParams)
 {
     //1. ЗАГОЛОВОК
     $builderCtxt->setTitle($this->basicPage->getTitle());
     //2. JAVASCRIPT
     $jsParams['postId'] = $ctxt->getPostId();
     $jsParams['rubricId'] = $ctxt->getRubricId();
     $jsParams['postType'] = $ctxt->getPostType();
     $jsParams['isPostsListPage'] = $ctxt->isPostsListPage();
     $jsParams['isRubricPage'] = $ctxt->isRubricPage();
     $jsParams['isPostPage'] = $ctxt->isPostPage();
     //Разборы, пройденные пользователем
     $passed = TrainManager::inst()->getUserPassedLessons();
     $jsParams['passedLessons'] = empty($passed) ? null : $passed;
     //Структура проекта
     $jsParams['structure'] = NavigationManager::inst()->getStructure();
     $builderCtxt->setJsParams($jsParams);
     //Параметры, зависимые от страницы
     $builderCtxt->setJsParams($this->basicPage->getJsParams());
     //3. SMARTY RESOURCES
     $builderCtxt->setSmartyParams4Resources($this->basicPage->getSmartyParams4Resources());
     //4. GET SMARTY PARAMS FOR TPL
     $smartyParams['host'] = ServerArrayAdapter::HTTP_HOST();
     $smartyParams['content'] = BasicPagesManager::inst()->getResourcesLinks($this->basicPage->getIdent(), ContentHelper::getContent($this->basicPage));
     return $smartyParams;
 }
开发者ID:ilivanoff,项目名称:ps-sdk-dev,代码行数:26,代码来源:basic.php


示例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::publish('articles.publish', 'JTOOLBAR_PUBLISH', true);
         JToolbarHelper::unpublish('articles.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         JToolbarHelper::custom('featured.delete', 'remove.png', 'remove_f2.png', 'JTOOLBAR_REMOVE', true);
         JToolbarHelper::archiveList('articles.archive');
         JToolbarHelper::checkin('articles.checkin');
     }
     if ($state->get('filter.published') == -2 && $canDo->get('core.delete')) {
         JToolbarHelper::deleteList('', 'articles.delete', 'JTOOLBAR_EMPTY_TRASH');
     } elseif ($canDo->get('core.edit.state')) {
         JToolbarHelper::trash('articles.trash');
     }
     if ($canDo->get('core.admin')) {
         JToolbarHelper::preferences('com_content');
     }
     JToolbarHelper::help('JHELP_CONTENT_FEATURED_ARTICLES');
     JHtmlSidebar::setAction('index.php?option=com_content&view=featured');
     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_content'), 'value', 'text', $this->state->get('filter.category_id')));
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_MAX_LEVELS'), 'filter_level', JHtml::_('select.options', $this->f_levels, 'value', 'text', $this->state->get('filter.level')));
     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_AUTHOR'), 'filter_author_id', JHtml::_('select.options', $this->authors, 'value', 'text', $this->state->get('filter.author_id')));
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_LANGUAGE'), 'filter_language', JHtml::_('select.options', JHtml::_('contentlanguage.existing', true, true), 'value', 'text', $this->state->get('filter.language')));
 }
开发者ID:RuDers,项目名称:JoomlaSQL,代码行数:40,代码来源:view.html.php


示例8: doBuild

 protected function doBuild(\PageContext $ctxt, \PageBuilderContext $builderCtxt, \RequestArrayAdapter $requestParams, \ArrayAdapter $buildParams)
 {
     //1. ЗАГОЛОВОК
     $builderCtxt->setTitle($this->authed ? 'Админка | ' . $this->adminPage->title() : 'xxx');
     //2. JAVASCRIPT
     $builderCtxt->setJsParams($this->authed ? $this->adminPage->getJsParams() : null);
     //3. SMARTY RESOURCES
     if ($this->authed) {
         $builderCtxt->setSmartyParams4Resources($this->adminPage->getSmartyParams4Resources());
         $builderCtxt->setSmartyParam4Resources('IDENT', $this->adminPage->getPageIdent());
         $builderCtxt->setSmartyParam4Resources('TIMELINE_ENABE', true);
     }
     $smartyParams['authed'] = $this->authed;
     if (!$this->authed) {
         return $smartyParams;
     }
     //Запустим неограниченный по времени режим - мало ли, что мы там будем делать:)
     PsUtil::startUnlimitedMode();
     //Получаем содержимое админской страницы
     $content = ContentHelper::getContent($this->adminPage);
     //Добавляем к ней ресурсы
     $content = APagesResources::inst()->getResourcesLinks($this->adminPage->getPageIdent(), $content);
     $smartyParams['page'] = $this->adminPage;
     $smartyParams['content'] = $content;
     $smartyParams['pagesLayout'] = AdminPagesManager::getInstance()->getLayout();
     return $smartyParams;
 }
开发者ID:ilivanoff,项目名称:www,代码行数:27,代码来源:admin.php


示例9: association

 /**
  * @param	int $articleid	The article item id
  */
 public static function association($articleid)
 {
     // Get the associations
     $associations = ContentHelper::getAssociations($articleid);
     foreach ($associations as $tag => $associated) {
         $associations[$tag] = (int) $associated->id;
     }
     // Get the associated menu items
     $db = JFactory::getDbo();
     $query = $db->getQuery(true);
     $query->select('c.*');
     $query->from('#__content as c');
     $query->select('cat.title as category_title');
     $query->leftJoin('#__categories as cat ON cat.id=c.catid');
     $query->where('c.id IN (' . implode(',', array_values($associations)) . ')');
     $query->leftJoin('#__languages as l ON c.language=l.lang_code');
     $query->select('l.image');
     $query->select('l.title as language_title');
     $db->setQuery($query);
     $items = $db->loadObjectList('id');
     // Check for a database error.
     if ($error = $db->getErrorMsg()) {
         JError::raiseWarning(500, $error);
         return false;
     }
     // Construct html
     $text = array();
     foreach ($associations as $tag => $associated) {
         if ($associated != $articleid) {
             $text[] = JText::sprintf('COM_CONTENT_TIP_ASSOCIATED_LANGUAGE', JHtml::_('image', 'mod_languages/' . $items[$associated]->image . '.gif', $items[$associated]->language_title, array('title' => $items[$associated]->language_title), true), $items[$associated]->title, $items[$associated]->category_title);
         }
     }
     return JHtml::_('tooltip', implode('<br />', $text), JText::_('COM_CONTENT_TIP_ASSOCIATION'), 'admin/icon-16-links.png');
 }
开发者ID:ngxuanmui,项目名称:thongtinonline.net,代码行数:37,代码来源:contentadministrator.php


示例10: preparePartnerSlides

 protected function preparePartnerSlides()
 {
     $slides = array();
     $data = Yii::app()->db->createCommand(sprintf('SELECT  p.title, ph.filename, ph.title photo_title, ph.description photo_description
                                                         FROM partners p 
                                                         LEFT JOIN gallery g ON g.`gallery_id` = p.gallery_id
                                                         LEFT JOIN photo ph ON ph.gallery_id = g.gallery_id
                                                         WHERE p.is_active = 1 AND p.partner_id <> %d AND (ph.is_top <> 1 OR ph.is_top IS NULL)
                                                         ORDER BY ph.sort_order DESC', Yii::app()->params['partner_id']))->queryAll();
     foreach ($data as $slide) {
         $slides[] = array('url' => ImageHelper::imageUrl('', $slide['filename']), 'content' => sprintf('<img src=\'%s\' alt\'%s\' title=\'%s\'></img>', ImageHelper::imageUrl('partner_footer_frontend', $slide['filename']), ContentHelper::prepareStr($slide['title']), ContentHelper::prepareStr($slide['title'])));
     }
     return $slides;
 }
开发者ID:andreyantonov78,项目名称:atmosphera,代码行数:14,代码来源:FrontendController.php


示例11: display

 /**
  * Display the view
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  void
  */
 public function display($tpl = null)
 {
     if ($this->getLayout() !== 'modal') {
         ContentHelper::addSubmenu('articles');
     }
     $this->items = $this->get('Items');
     $this->pagination = $this->get('Pagination');
     $this->state = $this->get('State');
     $this->authors = $this->get('Authors');
     $this->filterForm = $this->get('FilterForm');
     $this->activeFilters = $this->get('ActiveFilters');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     // Levels filter.
     $options = array();
     $options[] = JHtml::_('select.option', '1', JText::_('J1'));
     $options[] = JHtml::_('select.option', '2', JText::_('J2'));
     $options[] = JHtml::_('select.option', '3', JText::_('J3'));
     $options[] = JHtml::_('select.option', '4', JText::_('J4'));
     $options[] = JHtml::_('select.option', '5', JText::_('J5'));
     $options[] = JHtml::_('select.option', '6', JText::_('J6'));
     $options[] = JHtml::_('select.option', '7', JText::_('J7'));
     $options[] = JHtml::_('select.option', '8', JText::_('J8'));
     $options[] = JHtml::_('select.option', '9', JText::_('J9'));
     $options[] = JHtml::_('select.option', '10', JText::_('J10'));
     $this->f_levels = $options;
     // We don't need toolbar in the modal window.
     if ($this->getLayout() !== 'modal') {
         $this->addToolbar();
         $this->sidebar = JHtmlSidebar::render();
     } else {
         // In article associations modal we need to remove language filter if forcing a language.
         // We also need to change the category filter to show show categories with All or the forced language.
         if ($forcedLanguage = JFactory::getApplication()->input->get('forcedLanguage', '', 'CMD')) {
             // If the language is forced we can't allow to select the language, so transform the language selector filter into an hidden field.
             $languageXml = new SimpleXMLElement('<field name="language" type="hidden" default="' . $forcedLanguage . '" />');
             $this->filterForm->setField($languageXml, 'filter', true);
             // Also, unset the active language filter so the search tools is not open by default with this filter.
             unset($this->activeFilters['language']);
             // One last changes needed is to change the category filter to just show categories with All language or with the forced language.
             $this->filterForm->setFieldAttribute('category_id', 'language', '*,' . $forcedLanguage, 'filter');
         }
     }
     parent::display($tpl);
 }
开发者ID:adjaika,项目名称:J3Base,代码行数:55,代码来源:view.html.php


示例12: prepareSlides

 protected function prepareSlides()
 {
     $slides = array();
     $data = Yii::app()->db->createCommand('SELECT gp.*, p.title post_title, ph.filename, ph.title photo_title, ph.description photo_description, u.firstname, u.lastname
                                                         FROM galleryposts gp
                                                         LEFT JOIN users u ON u.user_id = gp.user_id                                                            
                                                         LEFT JOIN posting p ON p.post_id = gp.post_id
                                                         LEFT JOIN gallery g ON g.`gallery_id` = p.gallery_id
                                                         LEFT JOIN photo ph ON ph.gallery_id = g.gallery_id
                                                         WHERE gp.is_top = 1 AND gp.publication_date <= NOW()
                                                         ORDER BY ph.sort_order DESC')->queryAll();
     foreach ($data as $slide) {
         $slides[] = array('url' => ImageHelper::imageUrl('main_page_slider', $slide['filename']), 'content' => sprintf('<a href=\'%s\'><img src=\'%s\' alt=\'%s\' title=\'%s\'></img></a>', Yii::app()->createAbsoluteUrl('portfolio/default/view', array('id' => $slide['post_id'])), ImageHelper::imageUrl('main_page_slider', $slide['filename']), ContentHelper::prepareStr($slide['photo_description']), ContentHelper::prepareStr($slide['photo_description'])));
     }
     return $slides;
 }
开发者ID:andreyantonov78,项目名称:atmosphera,代码行数:16,代码来源:SiteController.php


示例13: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since   1.6
  */
 protected function addToolbar()
 {
     $canDo = ContentHelper::getActions($this->state->get('filter.category_id'));
     $user = JFactory::getUser();
     // Get the toolbar object instance
     $bar = JToolBar::getInstance('toolbar');
     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::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::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');
     } elseif ($canDo->get('core.edit.state')) {
         JToolbarHelper::trash('articles.trash');
     }
     // Add a batch button
     if ($user->authorise('core.create', 'com_content') && $user->authorise('core.edit', 'com_content') && $user->authorise('core.edit.state', 'com_content')) {
         JHtml::_('bootstrap.modal', 'collapseModal');
         $title = JText::_('JTOOLBAR_BATCH');
         // Instantiate a new JLayoutFile instance and render the batch button
         $layout = new JLayoutFile('joomla.toolbar.batch');
         $dhtml = $layout->render(array('title' => $title));
         $bar->appendButton('Custom', $dhtml, 'batch');
     }
     if ($canDo->get('core.admin')) {
         JToolbarHelper::preferences('com_content');
     }
     JToolbarHelper::help('JHELP_CONTENT_ARTICLE_MANAGER');
     JHtmlSidebar::setAction('index.php?option=com_content&view=articles');
     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_content'), 'value', 'text', $this->state->get('filter.category_id')));
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_MAX_LEVELS'), 'filter_level', JHtml::_('select.options', $this->f_levels, 'value', 'text', $this->state->get('filter.level')));
     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_AUTHOR'), 'filter_author_id', JHtml::_('select.options', $this->authors, 'value', 'text', $this->state->get('filter.author_id')));
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_LANGUAGE'), 'filter_language', JHtml::_('select.options', JHtml::_('contentlanguage.existing', true, true), 'value', 'text', $this->state->get('filter.language')));
     JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_TAG'), 'filter_tag', JHtml::_('select.options', JHtml::_('tag.options', true, true), 'value', 'text', $this->state->get('filter.tag')));
 }
开发者ID:fur81,项目名称:zofaxiopeu,代码行数:52,代码来源:view.html.php


示例14: display

 /**
  * Method to display a view.
  *
  * @param	boolean			If true, the view output will be cached
  * @param	array			An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
  *
  * @return	JController		This object to support chaining.
  * @since	1.5
  */
 public function display($cachable = false, $urlparams = false)
 {
     // Load the submenu.
     ContentHelper::addSubmenu(JRequest::getCmd('view', 'articles'));
     $view = JRequest::getCmd('view', 'articles');
     $layout = JRequest::getCmd('layout', 'articles');
     $id = JRequest::getInt('id');
     // Check for edit form.
     if ($view == 'article' && $layout == 'edit' && !$this->checkEditId('com_content.edit.article', $id)) {
         // Somehow the person just went to the form - we don't allow that.
         $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id));
         $this->setMessage($this->getError(), 'error');
         $this->setRedirect(JRoute::_('index.php?option=com_content&view=articles', false));
         return false;
     }
     parent::display();
     return $this;
 }
开发者ID:NavaINT1876,项目名称:ccustoms,代码行数:27,代码来源:controller.php


示例15: getAssociations

 /**
  * Method to get the associations for a given item
  *
  * @param   integer  $id    Id of the item
  * @param   string   $view  Name of the view
  *
  * @return  array   Array of associations for the item
  *
  * @since  3.0
  */
 public static function getAssociations($id = 0, $view = null)
 {
     jimport('helper.route', JPATH_COMPONENT_SITE);
     $app = JFactory::getApplication();
     $jinput = $app->input;
     $view = is_null($view) ? $jinput->get('view') : $view;
     $id = empty($id) ? $jinput->getInt('id') : $id;
     if ($view == 'article') {
         if ($id) {
             $associations = ContentHelper::getAssociations($id);
             $return = array();
             foreach ($associations as $tag => $item) {
                 $return[$tag] = ContentHelperRoute::getArticleRoute($item->id, $item->catid, $item->language);
             }
             return $return;
         }
     }
     if ($view == 'category' || $view == 'categories') {
         return self::getCategoryAssociations($id, 'com_content');
     }
     return array();
 }
开发者ID:interfaceslivres,项目名称:ccmd-ufpb,代码行数:32,代码来源:association.php


示例16: addToolbar

 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     JRequest::setVar('hidemainmenu', true);
     $user = JFactory::getUser();
     $userId = $user->get('id');
     $isNew = $this->item->id == 0;
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $userId);
     $canDo = ContentHelper::getActions($this->state->get('filter.category_id'), $this->item->id);
     JToolBarHelper::title(JText::_('COM_CONTENT_PAGE_' . ($checkedOut ? 'VIEW_ARTICLE' : ($isNew ? 'ADD_ARTICLE' : 'EDIT_ARTICLE'))), 'article-add.png');
     // Built the actions for new and existing records.
     // For new records, check the create permission.
     if ($isNew && count($user->getAuthorisedCategories('com_content', 'core.create')) > 0) {
         JToolBarHelper::apply('article.apply');
         JToolBarHelper::save('article.save');
         JToolBarHelper::save2new('article.save2new');
         JToolBarHelper::cancel('article.cancel');
     } else {
         // Can't save the record if it's checked out.
         if (!$checkedOut) {
             // Since it's an existing record, check the edit permission, or fall back to edit own if the owner.
             if ($canDo->get('core.edit') || $canDo->get('core.edit.own') && $this->item->created_by == $userId) {
                 JToolBarHelper::apply('article.apply');
                 JToolBarHelper::save('article.save');
                 // We can save this record, but check the create permission to see if we can return to make a new one.
                 if ($canDo->get('core.create')) {
                     JToolBarHelper::save2new('article.save2new');
                 }
             }
         }
         // If checked out, we can still save
         if ($canDo->get('core.create')) {
             JToolBarHelper::save2copy('article.save2copy');
         }
         JToolBarHelper::cancel('article.cancel', 'JTOOLBAR_CLOSE');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('JHELP_CONTENT_ARTICLE_MANAGER_EDIT');
 }
开发者ID:carmerin,项目名称:cesae-web,代码行数:43,代码来源:view.html.php


示例17: display

 /**
  * Display the view
  */
 function display()
 {
     require_once JPATH_COMPONENT . DS . 'helpers' . DS . 'content.php';
     // Get the document object.
     $document = JFactory::getDocument();
     // Set the default view name and format from the Request.
     $vName = JRequest::getWord('view', 'articles');
     $vFormat = $document->getType();
     $lName = JRequest::getWord('layout', 'default');
     // Get and render the view.
     if ($view =& $this->getView($vName, $vFormat)) {
         // Get the model for the view.
         $model =& $this->getModel($vName);
         // Push the model into the view (as default).
         $view->setModel($model, true);
         $view->setLayout($lName);
         // Push document object into the view.
         $view->assignRef('document', $document);
         $view->display();
         // Load the submenu.
         ContentHelper::addSubmenu($vName);
     }
 }
开发者ID:joebushi,项目名称:joomla,代码行数:26,代码来源:controller.php


示例18: foreach

<ul class="album-list article-album">
<?php 
foreach ($data as $blogs) {
    ?>
    <?php 
    $arr = explode(' ', $blogs['publication_date']);
    $timestamp = CDateTimeParser::parse($blogs['publication_date'], 'yyyy-MM-dd hh:mm:ss');
    $date = Yii::app()->dateFormatter->format('d MMMM y', $timestamp);
    $title = ContentHelper::cutStringEx($blogs['p_title'], 100);
    $imgUrl = ImageHelper::imageUrl('blogs_slider', $blogs['filename']);
    ?>
    <li title="<?php 
    echo $title;
    ?>
">
        <a href="<?php 
    echo Yii::app()->createAbsoluteUrl('blogs/default/view', array('id' => $blogs['id']));
    ?>
">
            <img style="width: 335px; height: 228px;" src="<?php 
    echo $imgUrl;
    ?>
" alt="<?php 
    echo $title;
    ?>
" title="<?php 
    echo $title;
    ?>
">
            <span>
                <span class="album-title"><?php 
开发者ID:andreyantonov78,项目名称:atmosphera,代码行数:31,代码来源:index.php


示例19: foreach

            <div class="rubric">
                 <?php 
    echo $data['content'];
    ?>
            </div>
            
            <?php 
    if ($data['is_active']) {
        ?>
            
                <ul class="photo-list">
                <?php 
        foreach ($photos as $photo) {
            ?>
                    <?php 
            $description = ContentHelper::cutStringEx($photo['description'], 100);
            $imgThumbUrl = ImageHelper::imageUrl('portfolio_index_frontend', $photo['filename']);
            $imgRawUrl = ImageHelper::imageUrl('raw', $photo['filename']);
            ?>
                    <li>
                        <a class="fancybox-button" rel="fancybox-button" href="<?php 
            echo $imgRawUrl;
            ?>
" title="<?php 
            echo $description;
            ?>
">
                            <img src="<?php 
            echo $imgThumbUrl;
            ?>
" alt="<?php 
开发者ID:andreyantonov78,项目名称:atmosphera,代码行数:31,代码来源:news.php


示例20: applyTextFilters

 /**
  * Apply Joomla text filters based on the user's groups
  *
  * @param  string $string The string to clean
  *
  * @return string         The cleaned string
  */
 public function applyTextFilters($string)
 {
     // Apply the textfilters (let's reuse Joomla's ContentHelper class)
     if (!class_exists('ContentHelper')) {
         require_once JPATH_SITE . '/administrator/components/com_content/helpers/content.php';
     }
     return ContentHelper::filterText((string) $string);
 }
开发者ID:JBZoo,项目名称:Zoo-Changelog,代码行数:15,代码来源:string.php



注:本文中的ContentHelper类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP ContentHelperQuery类代码示例发布时间:2022-05-23
下一篇:
PHP ContentHandler类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap