Tables
class Tables extends Tables (View source)
Alters entity queries to use a workspace revision instead of the default one.
Traits
Provides a standard way to announce deprecated properties.
Properties
| protected | $deprecatedProperties | {@inheritdoc} | from Tables |
| protected SelectInterface | $sqlQuery | from Tables | |
| protected array | $entityTables | Entity table array. |
from Tables |
| protected array | $fieldTables | Field table array, key is table name, value is alias. |
from Tables |
| protected EntityTypeManagerInterface | $entityTypeManager | The entity type manager. |
from Tables |
| protected EntityFieldManagerInterface | $entityFieldManager | The entity field manager. |
from Tables |
| protected array | $caseSensitiveFields | List of case sensitive fields. |
from Tables |
| protected WorkspaceManagerInterface | $workspaceManager | The workspace manager. |
|
| protected array | $contentWorkspaceTables | Workspace association table array, key is base table name, value is alias. |
|
| protected array | $baseTablesEntityType | Keeps track of the entity type IDs for each base table of the query. |
Methods
Adds a field to a database query.
Determines whether the given field is case sensitive.
Joins the entity table, if necessary, and returns the alias for it.
Join field table if necessary.
Adds a join to a given table.
Gets the schema for the given table.
Add the next entity base table.
Adds a new join to the 'workspace_association' table for an entity base table.
Details
__get($name)
Allows to access deprecated/removed properties.
This method must be public.
__construct(SelectInterface $sql_query)
No description
string
addField(string $field, string $type, string $langcode)
Adds a field to a database query.
bool|null
isFieldCaseSensitive(string $field_name)
Determines whether the given field is case sensitive.
This information can only be provided after it was added with addField().
protected string
ensureEntityTable(string $index_prefix, string $property, string $type, string $langcode, string $base_table, string $id_field, array $entity_tables)
Joins the entity table, if necessary, and returns the alias for it.
protected string
ensureFieldTable($index_prefix, $field, $type, $langcode, $base_table, $entity_id_field, $field_id_field, $delta)
Join field table if necessary.
protected string
addJoin(string $type, string $table, string $join_condition, string $langcode, string|null $delta = NULL)
Adds a join to a given table.
protected array|false
getTableMapping(string $table, $entity_type_id)
Gets the schema for the given table.
protected string
addNextBaseTable(EntityType $entity_type, string $table, string $sql_column, FieldStorageDefinitionInterface $field_storage)
Add the next entity base table.
For example, when building the SQL query for
string
addWorkspaceAssociationJoin(string $entity_type_id, string $base_table_alias, string $active_workspace_id)
Adds a new join to the 'workspace_association' table for an entity base table.
This method assumes that the active workspace has already been determined to be a non-default workspace.