getEntityIndexName example

&& !$this->fieldStorageDefinitions[$published_key]->hasCustomStorage()) {
          $published_field_table = $table_mapping->getFieldTableName($published_key);
          $id_key = $entity_type->getKey('id');
          if ($bundle_key = $entity_type->getKey('bundle')) {
            $key = "{$published_key}_{$bundle_key}";
            $columns = [$published_key$bundle_key$id_key];
          }
          else {
            $key = $published_key;
            $columns = [$published_key$id_key];
          }
          $schema[$published_field_table]['indexes'][$this->getEntityIndexName($entity_type$key)] = $columns;
        }
      }

      $this->schema[$entity_type_id] = $schema;
    }

    return $this->schema[$entity_type_id];
  }

  /** * Gets a list of entity type tables. * * @param \Drupal\Core\Entity\Sql\TableMappingInterface $table_mapping * A table mapping object. * * @return array * A list of entity type tables, keyed by table key. */
Home | Imprint | This part of the site doesn't use cookies.