/** * Prepare render hook. * * @return void */ protected function prepareRender() { parent::prepareRender(); // State $this['state'] = $this['state'] ?: $this->get('State'); // View data if (!$this['view']) { $this['view'] = new Data(); $this['view']->prefix = $this->prefix; $this['view']->option = $this->option; $this['view']->name = $this->getName(); $this['view']->viewItem = $this->viewItem; $this['view']->viewList = $this->viewList; $this['view']->layout = $this->layout; } // Uri data if (!$this['uri']) { $uri = \JUri::getInstance(); $this['uri'] = new Data(); $this['uri']->path = $uri->toString(array('path', 'query', 'fragment')); $this['uri']->base = \JUri::base(true); $this['uri']->root = \JUri::root(true); } // Asset data $this['asset'] = $this['asset'] ?: $this->container->get('helper.asset'); }
/** * Prepare render hook. * * @return void */ protected function prepareRender() { parent::prepareRender(); $data = $this->data; // View data $data->view = new Data(); $data->view->prefix = $this->prefix; $data->view->option = $this->option; $data->view->name = $this->getName(); $data->view->viewItem = $this->viewItem; $data->view->viewList = $this->viewList; $data->view->layout = $this->layout; // Uri data $uri = \JUri::getInstance(); $data->uri = new Data(); $data->uri->path = $uri->toString(array('path', 'query', 'fragment')); $data->uri->base = \JUri::base(true); $data->uri->root = \JUri::root(true); // Asset data $data->asset = $this->container->get('helper.asset'); }