protected function createTemplate($class = NULL) { $template = parent::createTemplate($class); $template->registerHelper('eventType', function ($key) { return $this->tt(EventType::getOptions()[$key]); }); return $template; }
public function typeRender($e) { return $this->tt(EventType::getOptions()[$e->getEvent()->getEventType()]); }
private function getTypes() { return EventType::getOptions(); }