function NodeStorageSchema::getEntitySchema

Same name and namespace in other branches
  1. 11.x core/modules/node/src/NodeStorageSchema.php \Drupal\node\NodeStorageSchema::getEntitySchema()

File

core/modules/node/src/NodeStorageSchema.php, line 17

Class

NodeStorageSchema
Defines the node schema handler.

Namespace

Drupal\node

Code

protected function getEntitySchema(ContentEntityTypeInterface $entity_type, $reset = FALSE) {
  $schema = parent::getEntitySchema($entity_type, $reset);
  if ($data_table = $this->storage
    ->getDataTable()) {
    $schema[$data_table]['indexes'] += [
      'node__frontpage' => [
        'promote',
        'status',
        'sticky',
        'created',
      ],
      'node__title_type' => [
        'title',
        [
          'type',
          4,
        ],
      ],
    ];
  }
  return $schema;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.