public function Drupal8::getEntityProperty in Realistic Dummy Content 3.x
Same name and namespace in other branches
- 8.2 api/src/Framework/Drupal8.php \Drupal\realistic_dummy_content_api\Framework\Drupal8::getEntityProperty()
- 7.2 api/src/Framework/Drupal8.php \Drupal\realistic_dummy_content_api\Framework\Drupal8::getEntityProperty()
Retrives the property value for an entity.
Overrides Framework::getEntityProperty
File
- api/
src/ Framework/ Drupal8.php, line 340
Class
- Drupal8
- Drupal 8-specific code.
Namespace
Drupal\realistic_dummy_content_api\FrameworkCode
public function getEntityProperty(&$entity, $property) {
// Drupal8 does not have properties.
if ($property == 'title') {
return $entity
->getTitle();
}
throw new \Exception(__FUNCTION__ . ' should not be called as Drupal8 does not use properties. ' . $property);
}