2 defined('_JEXEC') or die;
5 * Contains the article factory method and content component rendering helpers.
7 Artx::load("Artx_Content_ArchivedArticle");
8 Artx::load("Artx_Content_SingleArticle");
9 Artx::load("Artx_Content_CategoryArticle");
10 Artx::load("Artx_Content_FeaturedArticle");
14 protected $_component;
15 protected $_componentParams;
21 public function __construct($component, $params)
23 $this->_component = $component;
24 $this->_componentParams = $params;
26 $this->pageClassSfx = $component->pageclass_sfx;
27 $this->pageHeading = $this->_componentParams->get('show_page_heading', 1)
28 ? $this->_componentParams->get('page_heading') : '';
31 public function pageHeading($title = null)
33 return artxPost(array('header-text' => $this->_component->escape(null == $title ? $this->pageHeading : $title)));
36 public function article($view, $article, $params, $properties = array())
40 return new ArtxContentArchivedArticle($this->_component, $this->_componentParams,
43 return new ArtxContentSingleArticle($this->_component, $this->_componentParams,
44 $article, $params, $properties);
46 return new ArtxContentCategoryArticle($this->_component, $this->_componentParams,
49 return new ArtxContentFeaturedArticle($this->_component, $this->_componentParams,
54 public function beginPageContainer($class)
56 return '<div class="' . $class . $this->pageClassSfx .'">';
59 public function endPageContainer()