コード例 #1
0
 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()));
 }
コード例 #2
0
 private function decorateEdit($column)
 {
     $id = 'column_' . $column->id . '_field';
     $hexa = ColorHelper::CssRGBToHexa($column->bgcolor);
     $html = $this->fetchSquareColor('column_' . $column->id, $column->bgcolor, 'colorpicker');
     $html .= '<input id="' . $id . '" type="text" size="6" autocomplete="off" name="column[' . $column->id . '][bgcolor]" value="' . $hexa . '" />';
     return $html;
 }
コード例 #3
0
 public function build(Cardwall_Column $column)
 {
     $this->id = JsonCast::toInt($column->getId());
     $this->label = $column->getLabel();
     $this->color = ColorHelper::CssRGBToHexa($column->getBgcolor());
 }