public function build(Cardwall_CardInCellPresenter $card, $column_id, $planning_id, PFUser $user) { $this->id = $planning_id . '_' . $card->getId(); $this->label = $card->getArtifact()->getTitle(); $this->uri = self::ROUTE . '/' . $this->id; $artifact = $card->getArtifact(); $this->project = $this->getProjectReference($artifact->getTracker()->getProject()); $this->artifact = $this->getArtifactReference($artifact); $this->planning_id = JsonCast::toInt($planning_id); $this->status = $this->getCardStatus($card); if ($card->getCardPresenter()->getAccentColor()) { $this->accent_color = ColorHelper::CssRGBToHexa($card->getCardPresenter()->getAccentColor()); } $this->column_id = JsonCast::toInt($column_id); if ($this->column_id) { $this->allowed_column_ids = array_map(function ($value) { return JsonCast::toInt($value); }, $card->getDropIntoIds()); } else { $this->allowed_column_ids = array(); } $this->values = $this->mapAndFilter($card->getCardPresenter()->getFields(), $this->getFieldsValuesFilter($user, $artifact->getLastChangeset())); }
function __construct(Cardwall_CardInCellPresenter $presenter) { parent::__construct(null, $presenter->getId()); $this->presenter = $presenter; }
/** * @param string $title * @param array $cells */ public function __construct(Cardwall_CardInCellPresenter $swimline_artifact_presenter, array $cells) { $this->cells = $cells; $this->card_in_cell_presenter = $swimline_artifact_presenter; $this->swimline_id = $swimline_artifact_presenter->getId(); }