コード例 #1
0
 /**
  * @see Cardwall_OnTop_Config_Command::execute()
  */
 public function execute(Codendi_Request $request)
 {
     if ($request->get('column')) {
         foreach ($request->get('column') as $id => $column_definition) {
             $column_label = $column_definition['label'];
             $column_bg_red = 255;
             $column_bg_green = 255;
             $column_bg_blue = 255;
             if (!empty($column_definition['bgcolor'])) {
                 list($column_bg_red, $column_bg_green, $column_bg_blue) = ColorHelper::HexatoRGB($column_definition['bgcolor']);
             }
             if (!empty($column_label) && $this->dao->save($this->tracker->getId(), $id, $column_label, $column_bg_red, $column_bg_green, $column_bg_blue)) {
                 $GLOBALS['Response']->addFeedback('info', $GLOBALS['Language']->getText('plugin_cardwall', 'on_top_column_changed', array($column_label)));
             }
         }
     }
 }