예제 #1
0
파일: Goal.php 프로젝트: rjsmelo/tiki
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $goal = $input->getArgument('goal');
     $writer = $this->getProfileWriter($input);
     if (\Tiki_Profile_InstallHandler_Goal::export($writer, $goal)) {
         $writer->save();
     } else {
         $output->writeln("<error>Goal not found: {$goal}</error>");
         return;
     }
 }
예제 #2
0
파일: GoalSet.php 프로젝트: rjsmelo/tiki
 public static function export($writer)
 {
     $goallib = TikiLib::lib('goal');
     $goals = $goallib->listGoals();
     $ids = [];
     foreach ($goals as $goal) {
         if (Tiki_Profile_InstallHandler_Goal::export($writer, $goal['goalId'])) {
             $ids[] = $goal['goalId'];
         }
     }
     $writer->addObject('goal_set', 'set', array('goals' => $writer->getReference('goal', $ids)));
     return true;
 }