コード例 #1
0
 /**
  * @return string
  */
 public function getSelectedValueLabel(Cardwall_Column $column, $default = '')
 {
     foreach ($this->value_mappings as $mapping) {
         if ($mapping->getColumnId() == $column->getId()) {
             return $mapping->getValue()->getLabel();
         }
     }
     return $default;
 }
コード例 #2
0
 /**
  * Return true of the given status label belongs to the given column
  *
  * @param Cardwall_Column $column
  * @param String          $artifact_status
  *
  * @return Boolean
  */
 public function isMappedTo(Cardwall_Column $column, $artifact_status)
 {
     foreach ($this->getValueMappings() as $value_mapping) {
         if ($value_mapping->matchStatusLabel($artifact_status)) {
             return $value_mapping->getColumnId() == $column->getId();
         }
     }
     return false;
 }
コード例 #3
0
 public function isInColumn(Tracker_Artifact $artifact, Cardwall_FieldProviders_IProvideFieldGivenAnArtifact $field_provider, Cardwall_Column $column)
 {
     $artifact_status = null;
     $field = $field_provider->getField($artifact);
     if ($field) {
         $artifact_status = $field->getFirstValueFor($artifact->getLastChangeset());
     }
     return $column->canContainStatus($artifact_status, $this->getMappingFor($artifact->getTracker()));
 }
コード例 #4
0
 public function getName(Cardwall_Column $column)
 {
     return 'cardwall_renderer_' . $this->report->id . '_column_' . $column->getId();
 }
コード例 #5
0
 public function setColumnPreference(Cardwall_Column $column)
 {
     $column->setAutostack($this->isColumnAutoStacked($column))->setAutostackPreference($this->getName($column));
 }
コード例 #6
0
 public function getName(Cardwall_Column $column)
 {
     return 'cardwall_dashboard_' . $this->tracker->getId() . '_column_' . $column->getId();
 }