You are here

public function ResourceFieldCollection::get in RESTful 7.2

Get an element of the collection by its key.

Parameters

string $key: The key of the field.

Return value

ResourceFieldInterface The requested field.

Overrides ResourceFieldCollectionInterface::get

2 calls to ResourceFieldCollection::get()
ResourceFieldCollection::evalFilter in src/Plugin/resource/Field/ResourceFieldCollection.php
Evaluate a parsed filter on a field collection.
ResourceFieldCollection::__construct in src/Plugin/resource/Field/ResourceFieldCollection.php
Constructor.

File

src/Plugin/resource/Field/ResourceFieldCollection.php, line 169
Contains \Drupal\restful\Plugin\resource\Field\ResourceFieldCollection.

Class

ResourceFieldCollection

Namespace

Drupal\restful\Plugin\resource\Field

Code

public function get($key) {
  return isset($this->fields[$key]) ? $this->fields[$key] : NULL;
}