public function findAllByBudgetId($budgetId)
    {
        $budgetId = (int) $budgetId;

        $this->addWhere('budget_id', $budgetId);
        $list = $this->select();

        $collection = array();
        foreach ($list as $item) {
            $collection[$item->getCategoryId()] = $item;
        }

        return $collection;
    }
public function findAllByBudgetId($budgetId)
    {
        $budgetId = (int) $budgetId;

        $this->addWhere('budget_id', $budgetId);
        $list = $this->select();

        $collection = array();
        foreach ($list as $item) {
            $collection[$item->getCategoryId()] = $item;
        }

        return $collection;
    }
public function findAllByBudgetId ( $ budgetId ) { $ budgetId = ( int ) $ budgetId ; $ this -> addWhere ( 'budget_id' , $ budgetId ) ; $ list = $ this -> select ( ) ; $ collection = array ( ) ; foreach ( $ list as $ item ) { $ collection [ $ item -> getCategoryId ( ) ] = $ item ; } return $ collection ; }
Get all categories by id.

@param  int $budgetId
@return BudgetCategory[]
Get all categories by id .