コード例 #1
0
ファイル: ListCommand.php プロジェクト: apioo/fusio-impl
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $result = $this->actionService->getAll($input->getOption('startIndex'), $input->getArgument('search'));
     $rows = [];
     foreach ($result->entry as $row) {
         $rows[] = [$row->id, $row->name];
     }
     $table = new Table($output);
     $table->setHeaders(['ID', 'Name'])->setRows($rows);
     $table->render($output);
 }
コード例 #2
0
ファイル: Entity.php プロジェクト: apioo/fusio-impl
 /**
  * Returns the DELETE response
  *
  * @param \PSX\Record\RecordInterface $record
  * @return array|\PSX\Record\RecordInterface
  */
 protected function doDelete($record)
 {
     $this->actionService->delete((int) $this->getUriFragment('action_id'));
     return array('success' => true, 'message' => 'Action successful deleted');
 }
コード例 #3
0
ファイル: Collection.php プロジェクト: apioo/fusio-impl
 /**
  * Returns the POST response
  *
  * @param \PSX\Record\RecordInterface $record
  * @return array|\PSX\Record\RecordInterface
  */
 protected function doPost($record)
 {
     $this->actionService->create($record->name, $record->class, $record->config->getProperties());
     return array('success' => true, 'message' => 'Action successful created');
 }