private function importOneCardwall(SimpleXMLElement $cardwall_tracker, $tracker_id) { $enabled = $this->cardwall_ontop_dao->enable($tracker_id); if (!$enabled) { throw new CardwallFromXmlImportCannotBeEnabledException($tracker_id); } $this->cardwall_ontop_dao->enableFreestyleColumns($tracker_id); if ($cardwall_tracker->{CardwallConfigXml::NODE_COLUMNS}) { $this->importColumns($cardwall_tracker->{CardwallConfigXml::NODE_COLUMNS}, $tracker_id); } }
/** * Get Frestyle columns for Cardwall_OnTop, or status columns if none * * @param Tracker $tracker * @return Cardwall_OnTop_Config_ColumnCollection */ public function getDashboardColumns(Tracker $tracker, Tracker $swimline_tracker) { $columns = $this->getColumnsFromDao($tracker); if (!$this->on_top_dao->isFreestyleEnabled($tracker->getId())) { $status_columns = $this->getColumnsFromStatusField($swimline_tracker); if (count($status_columns)) { $columns = $status_columns; } } return $columns; }
/** * @see Cardwall_OnTop_Config_Command::execute() */ public function execute(Codendi_Request $request) { $please_enable = $request->get('use_freestyle_columns'); $tracker_id = $this->tracker->getId(); $is_enabled = $this->dao->isFreestyleEnabled($tracker_id); if ($please_enable) { if (!$is_enabled) { $this->dao->enableFreestyleColumns($tracker_id); } } else { if ($is_enabled) { $this->dao->disableFreestyleColumns($tracker_id); } } }
/** * @see Cardwall_OnTop_Config_Command::execute() */ public function execute(Codendi_Request $request) { $please_enable = $request->get('cardwall_on_top'); $tracker_id = $this->tracker->getId(); $is_enabled = $this->dao->isEnabled($tracker_id); if ($please_enable) { if (!$is_enabled) { $this->dao->enable($tracker_id); $GLOBALS['Response']->addFeedback('info', $GLOBALS['Language']->getText('plugin_cardwall', 'on_top_enabled')); } } else { if ($is_enabled) { $this->dao->disable($tracker_id); $GLOBALS['Response']->addFeedback('info', $GLOBALS['Language']->getText('plugin_cardwall', 'on_top_disabled')); } } }
public function disable() { return $this->dao->disable($this->tracker->getId()); }