You are here

public static function ResourceFieldDbColumn::create in RESTful 7.2

Factory.

Parameters

array $field: Contains the field values.

RequestInterface $request: The request.

Return value

ResourceFieldInterface The created field

Throws

ServerConfigurationException

Overrides ResourceField::create

File

src/Plugin/resource/Field/ResourceFieldDbColumn.php, line 38
Contains \Drupal\restful\Plugin\resource\Field\ResourceFieldDbColumn.

Class

ResourceFieldDbColumn

Namespace

Drupal\restful\Plugin\resource\Field

Code

public static function create(array $field, RequestInterface $request = NULL) {
  $resource_field = new static($field, $request ?: restful()
    ->getRequest());
  $resource_field
    ->addDefaults();
  return $resource_field;
}