示例#1
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $id = $input->getArgument('config');
     $writer = $this->getProfileWriter($input);
     $result = \Tiki_Profile_InstallHandler_RatingConfig::export($writer, $id);
     if ($result) {
         $writer->save();
     } else {
         $output->writeln("Configuration not found: {$id}");
     }
 }
示例#2
0
 public static function export($writer)
 {
     $configlib = TikiLib::lib('ratingconfig');
     $configs = $configlib->get_configurations();
     $ids = array();
     foreach ($configs as $config) {
         if (Tiki_Profile_InstallHandler_RatingConfig::export($writer, $config)) {
             $ids[] = $config['ratingConfigId'];
         }
     }
     $writer->addObject('rating_config_set', 'set', array('configs' => array_map(function ($id) use($writer) {
         return $writer->getReference('rating_config', $id);
     }, $ids)));
     return true;
 }