Skip to main content

Entity queries

DrevOps\BehatSteps\Steps\Helper\Drupal\QueryTrait - Source

Finds the entities a step reads, asserts on or deletes.

public function queryEntityIds(string $entity_type, array $conditions = [], ?string $bundle = NULL): array

Load the ids of the entities of a type matching the conditions

public function queryEntityStubs(string $entity_type, string $id_key, array $conditions = [], ?string $bundle = NULL): array

Load a stub for each entity of a type matching the conditions

public function queryFindNewestEntityId(string $entity_type, array $conditions = [], ?string $bundle = NULL): ?string

Find the id of the newest entity of a type matching the conditions

public function queryGetEntityId(EntityStubInterface $stub, string $id_key): string

Get the id a stub carries

public function queryNodeIds(string $content_type, array $conditions = []): array

Load the ids of the nodes of a content type matching the conditions