protected function getHookChoices() { $choices = array(); $hooks = HookQuery::create()->filterByActivate(true, Criteria::EQUAL)->joinWithI18n($this->translator->getLocale())->orderBy('HookI18n.title', Criteria::ASC)->find(); /** @var Hook $hook */ foreach ($hooks as $hook) { $choices[$hook->getId()] = $hook->getTitle() . ' (code ' . $hook->getCode() . ')'; } return $choices; }