public function getByUrl(?string $url, $locale): ?Page
	{
		/* @var $orm Orm */
		$orm = $this->getRepository()->getModel();
		if ($locale instanceof Locale) {
			$eLocale = $locale;
		} else {
			$eLocale = $orm->locales->getByLocale($locale);
		}

		$urls = $this->getPageList();
		if (isset($urls[$url])) {
			$builder = $this->builder()
				->andWhere('[id] = %i', $urls[$url])
				->andWhere('[localeId] = %i', $eLocale->id);
			return $this->toEntity($builder);
		}
		return null;
	}
public function getByUrl(?string $url, $locale): ?Page
	{
		/* @var $orm Orm */
		$orm = $this->getRepository()->getModel();
		if ($locale instanceof Locale) {
			$eLocale = $locale;
		} else {
			$eLocale = $orm->locales->getByLocale($locale);
		}

		$urls = $this->getPageList();
		if (isset($urls[$url])) {
			$builder = $this->builder()
				->andWhere('[id] = %i', $urls[$url])
				->andWhere('[localeId] = %i', $eLocale->id);
			return $this->toEntity($builder);
		}
		return null;
	}
public function getByUrl ( ? string $ url , $ locale ) : ? Page { /* @var $orm Orm */ $ orm = $ this -> getRepository ( ) -> getModel ( ) ; if ( $ locale instanceof Locale ) { $ eLocale = $ locale ; } else { $ eLocale = $ orm -> locales -> getByLocale ( $ locale ) ; } $ urls = $ this -> getPageList ( ) ; if ( isset ( $ urls [ $ url ] ) ) { $ builder = $ this -> builder ( ) -> andWhere ( '[id] = %i' , $ urls [ $ url ] ) -> andWhere ( '[localeId] = %i' , $ eLocale -> id ) ; return $ this -> toEntity ( $ builder ) ; } return null ; }
Vrati stranku podle url
@param string|null $url
@param string|Locale $locale
@return IEntity|Page|null
@throws Throwable
Vrati stranku podle url