Esempio n. 1
0
 /**
  * {@inheritdoc}
  */
 public function visit(CommandInterface $command, Response $response, Parameter $param, &$value, $context = null)
 {
     // check if there's a link provided for the param's "wire" name
     $links = $this->get($command, 'links');
     if (!empty($links[$param->getWireName()])) {
         // create a command representing the link
         $linkCommand = $this->builder->createLinkCommand($command, $param, $links[$param->getWireName()]);
         // store the created link command in the results array
         $value[self::ELEMENT][$param->getName()] = $linkCommand;
     }
 }
Esempio n. 2
0
 /**
  * {@inheritdoc}
  */
 protected function createResourceFromData(CommandInterface $command, Parameter $structure, array $data)
 {
     return $this->builder->createLinkCommand($command, $structure, $data);
 }