public function ResourceFieldBase::setMethods in RESTful 7.2
Parameters
array $methods:
Throws
Overrides ResourceFieldInterface::setMethods
File
- src/
Plugin/ resource/ Field/ ResourceFieldBase.php, line 273 - Contains \Drupal\restful\Plugin\resource\Field\ResourceFieldBase.
Class
Namespace
Drupal\restful\Plugin\resource\FieldCode
public function setMethods($methods) {
foreach ($methods as $method) {
if (Request::isValidMethod($method)) {
throw new ServerConfigurationException(sprintf('The method %s in the field resource mapping is not valid.', $method));
}
}
$this->methods = $methods;
}