g

Query

Generic helper for retrieving data from other entities. Can be accessed in templates using $_query. Use entity or model name as entity, for example for example Blogs\Models\Frontend\Blog or Blogs\Entities\Post, as found in the Modules documentation.

Method Description Returns
findBy(string $entity, array $criteria, ?array $orderBy, ?int $limit, ?int $offset) Find records for the specified entity Collection
findOneBy(string $entity, array $criteria, ?array $orderBy) Find a record for the specified entity. Returns null of the record could not be found for the criteria. Coredna\Kernel\Models\Response\ResponseModel
findCustomEntityRecordsBy(string $identifier, array $criteria, ?array $orderBy, ?int $limit, ?int $offset) Find records for the specified custom entity Collection
findCustomEntityRecordBy(string $identifier, array $criteria, ?array $orderBy) Find a record for the specified custom entity. Returns null of the record could not be found for the criteria. Coredna\Kernel\Models\Response\ResponseModel