Exemple #1
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $trackerId = $input->getArgument('tracker');
     $writer = $this->getProfileWriter($input);
     $result = \Tiki_Profile_InstallHandler_Tracker::export($writer, $trackerId);
     if ($result) {
         $writer->save();
     } else {
         $output->writeln("Tracker not found: {$trackerId}");
     }
 }
Exemple #2
0
 function action_export_profile($input)
 {
     if (!Perms::get()->admin_trackers) {
         throw new Services_Exception_Denied(tr('Reserved to tracker administrators'));
     }
     $trackerId = $input->trackerId->int();
     $profile = Tiki_Profile::fromString('dummy', '');
     $data = array();
     $profileObject = new Tiki_Profile_Object($data, $profile);
     $profileTrackerInstallHandler = new Tiki_Profile_InstallHandler_Tracker($profileObject, array());
     $export_yaml = $profileTrackerInstallHandler->_export($trackerId, $profileObject);
     include_once 'lib/wiki-plugins/wikiplugin_code.php';
     $export_yaml = wikiplugin_code($export_yaml, array('caption' => 'YAML', 'colors' => 'yaml'));
     $export_yaml = preg_replace('/~[\\/]?np~/', '', $export_yaml);
     return array('trackerId' => $trackerId, 'yaml' => $export_yaml);
 }
Exemple #3
0
 private function getOptionConverters()
 {
     return Tiki_Profile_InstallHandler_Tracker::getOptionConverters();
 }