public function __construct($config = array()) { parent::__construct($config); $model = JModelLegacy::getInstance('Articles', 'ContentModel'); $this->_document = JFactory::getDocument(); $this->_addAssets(); $this->setModel($model, true); }
/** * Constructor * * @param array $config A named configuration array for object construction. */ public function __construct($config = array()) { // Display only the component output JFactory::getApplication()->input->def('tmpl', 'component'); parent::__construct($config); // Load article model $model = JSNBaseModel::getInstance('Articles', 'ContentModel'); $this->setModel($model, true); // Include the component HTML helpers $this->addTemplatePath(dirname(__FILE__) . '/tmpl'); JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); // Load assets JSNBaseHelper::loadAssets(); echo JSNHtmlAsset::loadScript('jsn/selectorFilter', array(), true); }