throw new MissingDataException("Unable to get property $property_name as no entity has been provided.");
}
if (!$this->entity instanceof FieldableEntityInterface) {
- // @todo: Add support for config entities in
- // https://www.drupal.org/node/1818574.
throw new \InvalidArgumentException("Unable to get unknown property $property_name.");
}
// This will throw an exception for unknown fields.
throw new MissingDataException("Unable to set property $property_name as no entity has been provided.");
}
if (!$this->entity instanceof FieldableEntityInterface) {
- // @todo: Add support for config entities in
- // https://www.drupal.org/node/1818574.
throw new \InvalidArgumentException("Unable to set unknown property $property_name.");
}
// This will throw an exception for unknown fields.
throw new MissingDataException('Unable to get properties as no entity has been provided.');
}
if (!$this->entity instanceof FieldableEntityInterface) {
- // @todo: Add support for config entities in
- // https://www.drupal.org/node/1818574.
return [];
}
return $this->entity->getFields($include_computed);