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