/** * {@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; } }
/** * {@inheritdoc} */ protected function createResourceFromData(CommandInterface $command, Parameter $structure, array $data) { return $this->builder->createLinkCommand($command, $structure, $data); }