getBackupListQuery example


    public function getList($offset$limit)
    {
        /** @var Query<array<string, mixed>> $query */
        $query = $this->getDqlHelper()->getEntityManager()->getRepository(BackupModel::class)
            ->getBackupListQuery($offset$limit);
        $query->setHydrationMode(AbstractQuery::HYDRATE_ARRAY);
        $paginator = Shopware()->Models()->createPaginator($query);
        $totalCount = $paginator->count();

        $backups = iterator_to_array($paginator);

        return [
            'totalCount' => $totalCount,
            'data' => $backups,
        ];
    }

    
Home | Imprint | This part of the site doesn't use cookies.