You are here

protected function NodeSchema::createDescription in Schemata 8

Generates a description for the schema based on the types.

Parameters

string $entityType: Required entity type which the schema defines.

string $bundle: Optional value to be separated from the required prefix if present.

Return value

string The description value.

Overrides Schema::createDescription

File

src/Schema/NodeSchema.php, line 33

Class

NodeSchema
Specialized schema for Node Entities.

Namespace

Drupal\schemata\Schema

Code

protected function createDescription($entityType, $bundle = '') {
  $description = $this->nodeType
    ->getDescription();
  if (empty($description)) {
    return parent::createDescription($entityType, $bundle);
  }
  return addslashes(strip_tags($description));
}