You are here

public function WSCall::setOptions in Web Service Data 2.0.x

Same name and namespace in other branches
  1. 8 src/Entity/WSCall.php \Drupal\wsdata\Entity\WSCall::setOptions()

Doesn't save the WSCall though.

Overrides WSCallInterface::setOptions

File

src/Entity/WSCall.php, line 250

Class

WSCall
Defines the Web Service Call entity.

Namespace

Drupal\wsdata\Entity

Code

public function setOptions($values = []) {
  if (!isset($this->wsserverInst)) {
    $this->wsserverInst = \Drupal::service('entity_type.manager')
      ->getStorage('wsserver')
      ->load($values['wsserver']);
  }
  $this->options[$this->wsserver] = $this->wsserverInst->wsconnectorInst
    ->saveOptions($values);
  $this->needSave = TRUE;
}