public function build(Cardwall_Swimline $swimline, $planning_id, PFUser $user) { $this->cards = array(); $swimline_card_in_cell_presenter = $swimline->getCardInCellPresenter(); if ($swimline_card_in_cell_presenter) { $card_representation = new AgileDashboard_CardRepresentation(); $card_representation->build($swimline_card_in_cell_presenter, null, $planning_id, $user); $this->cards[] = $card_representation; } foreach ($swimline->getCells() as $cell) { $column_id = $cell['column_id']; foreach ($cell['cardincell_presenters'] as $card) { $card_representation = new AgileDashboard_CardRepresentation(); $card_representation->build($card, $column_id, $planning_id, $user); $this->cards[] = $card_representation; } } }