/** * Method to instantiate the view. * * @param JModel $model The model object. * @param SplPriorityQueue $paths The paths queue. * * @since 3.2 */ public function __construct(JModel $model, SplPriorityQueue $paths = null) { $app = JFactory::getApplication(); $component = JApplicationHelper::getComponentName(); $component = preg_replace('/[^A-Z0-9_\\.-]/i', '', $component); if (isset($paths)) { $paths->insert(JPATH_THEMES . '/' . $app->getTemplate() . '/html/' . $component . '/' . $this->getName(), 2); } parent::__construct($model, $paths); }
/** * Method to instantiate the view. * * @param String $name The name of view * @param \JModel $model The model object * @param \SplPriorityQueue $paths The paths queue * * @since 1.0.0 */ public function __construct($name = null, \JModel $model = null, \SplPriorityQueue $paths = null) { if (!isset($model)) { $model = new \Idivision\Helpers\Model(); } if (!isset($name)) { $name = substr(get_class($this), strlen(__NAMESPACE__) + 1); } $this->name = strtolower($name); parent::__construct($model); }
/** * Constructor for all views. * * @param MonitorModelAbstract $model Model containing the information to be displayed by the view. * @param SplPriorityQueue $paths The paths queue. * * @throws Exception */ public function __construct(MonitorModelAbstract $model, SplPriorityQueue $paths = null) { if ($paths === null) { $paths = new SplPriorityQueue(); } // Get the params // TODO: may be removed when new MVC is implemented completely $app = JFactory::getApplication(); if ($app instanceof JApplicationSite) { $this->params = $app->getParams(); $active = $app->getMenu()->getActive(); if ($active) { $this->params->merge($active->params); } } else { $this->params = JComponentHelper::getParams('com_monitor'); } $reflector = new ReflectionObject($this); $paths->insert(dirname($reflector->getFileName()) . '/tmpl', 1); parent::__construct($model, $paths); }
public function __construct(JModel $model, SplPriorityQueue $paths = NULL) { parent::__construct($model, $paths); $this->paths->insert(__DIR__ . '/tmpl', 'normal'); }
public function __construct(GModelComments $model, SplPriorityQueue $paths = null) { parent::__construct($model, $paths); }
public function __construct(JModel $model, SplPriorityQueue $paths = NULL) { parent::__construct($model, $paths); }