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); } }
/** * @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 enable() { return $this->dao->enable($this->tracker->getId()); }