You are here

public function RealisticDummyContentEntityBase::getType in Realistic Dummy Content 3.x

Same name and namespace in other branches
  1. 8.2 api/src/includes/RealisticDummyContentEntityBase.php \Drupal\realistic_dummy_content_api\includes\RealisticDummyContentEntityBase::getType()
  2. 7.2 api/src/includes/RealisticDummyContentEntityBase.php \Drupal\realistic_dummy_content_api\includes\RealisticDummyContentEntityBase::getType()

Get the entity type of the entity being manipulated.

All entities must have a type and a bundle. The type can be node, user, etc. and the bundle can be article, page. In case of a user, there must be a bundle even if there is only one: it is called user, like the entity type.

Return value

string The entity type, for example "node" or "user".

2 calls to RealisticDummyContentEntityBase::getType()
RealisticDummyContentEntityBase::getBundle in api/src/includes/RealisticDummyContentEntityBase.php
Get the bundle of the entity being manipulated.
RealisticDummyContentFieldModifier::getFields in api/src/includes/RealisticDummyContentFieldModifier.php
Get fields for the entity, for example body or field_image.

File

api/src/includes/RealisticDummyContentEntityBase.php, line 126

Class

RealisticDummyContentEntityBase
Generic entity manipulator.

Namespace

Drupal\realistic_dummy_content_api\includes

Code

public function getType() {
  $return = $this->type;
  return $return;
}