getQueryBuilderForTable('pages'); $matomoId = $queryBuilder ->select('tx_opentalent_matomo_id') ->from('pages') ->where($queryBuilder->expr()->eq('uid', $rootPageUid)) ->andWhere($queryBuilder->expr()->eq('is_siteroot', 1)) ->execute() ->fetchColumn(0); if ($matomoId === false) { throw new \RuntimeException('No existing root page with uid ' . $rootPageUid); } return $matomoId; } }