addWorkspaceAssociationJoin example

return parent::addJoin($type$table$join_condition$langcode$delta);
  }

  /** * {@inheritdoc} */
  protected function addNextBaseTable(EntityType $entity_type$table$sql_column, FieldStorageDefinitionInterface $field_storage) {
    $next_base_table_alias = parent::addNextBaseTable($entity_type$table$sql_column$field_storage);

    $active_workspace_id = $this->sqlQuery->getMetaData('active_workspace_id');
    if ($active_workspace_id && $this->workspaceManager->isEntityTypeSupported($entity_type)) {
      $this->addWorkspaceAssociationJoin($entity_type->id()$next_base_table_alias$active_workspace_id);
    }

    return $next_base_table_alias;
  }

  /** * 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. * * @param string $entity_type_id * The ID of the entity type whose base table we are joining. * @param string $base_table_alias * The alias of the entity type's base table. * @param string $active_workspace_id * The ID of the active workspace. * * @return string * The alias of the joined table. */
Home | Imprint | This part of the site doesn't use cookies.