public function Drupal8::getEntityType in Realistic Dummy Content 7.2
Same name and namespace in other branches
- 8.2 api/src/Framework/Drupal8.php \Drupal\realistic_dummy_content_api\Framework\Drupal8::getEntityType()
- 3.x api/src/Framework/Drupal8.php \Drupal\realistic_dummy_content_api\Framework\Drupal8::getEntityType()
Returns the entity type (e.g. node, user) as a string.
Parameters
object $entity: A Drupal entity.
Return value
string An entity type machine name (id).
Throws
Exception
2 calls to Drupal8::getEntityType()
- Drupal8::frameworkSpecificTests in api/
src/ Framework/ Drupal8.php - Perform framework-specific tests, if any.
- Drupal8::hookEntityPresave in api/
src/ Framework/ Drupal8.php
File
- api/
src/ Framework/ Drupal8.php, line 84
Class
- Drupal8
- Drupal 8-specific code.
Namespace
Drupal\realistic_dummy_content_api\FrameworkCode
public function getEntityType($entity) {
return $entity
->getEntityType()
->id();
}