|
|
@@ -94,6 +94,26 @@ class OtWebsiteRepository
|
|
|
return $website;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * Get the OtWebsite by its config identifier
|
|
|
+ *
|
|
|
+ * @throws NoSuchWebsiteException
|
|
|
+ */
|
|
|
+ public function getWebsiteByConfigIdentifier(string $identifier): array
|
|
|
+ {
|
|
|
+ $queryBuilder = $this->connectionPool->getQueryBuilderForTable('ot_websites');
|
|
|
+ $website = $queryBuilder
|
|
|
+ ->select('*')
|
|
|
+ ->from('ot_websites')
|
|
|
+ ->where($queryBuilder->expr()->eq('config_identifier', $queryBuilder->expr()->literal($identifier)))
|
|
|
+ ->execute()
|
|
|
+ ->fetch();
|
|
|
+ if (!isset($website['uid'])) {
|
|
|
+ throw new NoSuchWebsiteException('No website found for page ' . $pageUid);
|
|
|
+ }
|
|
|
+ return $website;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* Get the root page uid of the given OtWebsite
|
|
|
*
|