public function Field::offsetGet

File

drupal/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/Field.php, line 566
Contains \Drupal\field\Plugin\Core\Entity\Field.

Class

Field
Defines the Field entity.

Namespace

Drupal\field\Plugin\Core\Entity

Code

public function &offsetGet($offset) {
  switch ($offset) {
    case 'id':
      return $this->uuid;
    case 'field_name':
      return $this->id;
    case 'columns':
      $this
        ->getSchema();
      return $this->schema['columns'];
    case 'foreign keys':
      $this
        ->getSchema();
      return $this->schema['foreign keys'];
    case 'bundles':
      $bundles = $this
        ->getBundles();
      return $bundles;
    case 'storage_details':
      $this
        ->getStorageDetails();
      return $this->storageDetails;
  }
  return $this->{$offset};
}