setEntityTypeId($parts[1]); } if (isset($parts[2])) { $definition->setBundles(array($parts[2])); } return $definition; } /** * {@inheritdoc} */ public function getDataType() { $type = 'entity_revision'; if ($entity_type = $this->getEntityTypeId()) { $type .= ':' . $entity_type; // Append the bundle only if we know it for sure and it is not the default // bundle. if (($bundles = $this->getBundles()) && count($bundles) == 1) { $bundle = reset($bundles); if ($bundle != $entity_type) { $type .= ':' . $bundle; } } } return $type; } }