protected function getCategoryTypes() { $types = \HomefinanceBundle\Category\Type::getAllTypes(); foreach ($types as $type) { $return[$type] = $type; } return $return; }
/** * @param $type * @return $this * @throws InvalidCategoryTypeException */ public function setType($type) { if (!Type::isTypeValid($type)) { throw new InvalidCategoryTypeException(); } $this->type = $type; return $this; }