/** * Get the view context * * @param ViewContextInterface $context Context to cast to a local context * @return ViewContext */ public function getContext(ViewContextInterface $context = null) { $context = new ViewContext($context); $context->setEntity($this->getModel()->fetch()); $context->setData($this->getData()); $context->setParameters($this->getParameters()); return $context; }
public function getTemplateLocator(Template $template) { $locator = parent::getTemplateLocator($template); $locator->prependLocation(DIRNAME_ELEMENTS . DIRECTORY_SEPARATOR . DIRNAME_EXPRESS . DIRECTORY_SEPARATOR . DIRNAME_EXPRESS_FORM_CONTROLS . DIRECTORY_SEPARATOR . 'dashboard_view' . DIRECTORY_SEPARATOR . $template->getTemplateHandle() . '.php'); return $locator; }