rewriting
This commit is contained in:
@@ -35,6 +35,13 @@ use Thelia\Model\Map\RewritingUrlTableMap;
|
|||||||
*/
|
*/
|
||||||
class RewritingRetriever
|
class RewritingRetriever
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @param $view
|
||||||
|
* @param $viewLocale
|
||||||
|
* @param $viewId
|
||||||
|
*
|
||||||
|
* @return null|$url
|
||||||
|
*/
|
||||||
public function getViewUrl($view, $viewLocale, $viewId)
|
public function getViewUrl($view, $viewLocale, $viewId)
|
||||||
{
|
{
|
||||||
$url = $this->getViewUrlQuery($view, $viewId, $viewLocale);
|
$url = $this->getViewUrlQuery($view, $viewId, $viewLocale);
|
||||||
@@ -42,6 +49,13 @@ class RewritingRetriever
|
|||||||
return $url === null ? null : $url->getUrl();
|
return $url === null ? null : $url->getUrl();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param $view
|
||||||
|
* @param $viewId
|
||||||
|
* @param $viewLocale
|
||||||
|
*
|
||||||
|
* @return null|RewritingUrl
|
||||||
|
*/
|
||||||
protected function getViewUrlQuery($view, $viewId, $viewLocale)
|
protected function getViewUrlQuery($view, $viewId, $viewLocale)
|
||||||
{
|
{
|
||||||
return RewritingUrlQuery::create()
|
return RewritingUrlQuery::create()
|
||||||
@@ -55,12 +69,18 @@ class RewritingRetriever
|
|||||||
->findOne();
|
->findOne();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param $view
|
||||||
|
* @param $viewLocale
|
||||||
|
* @param null $viewId
|
||||||
|
* @param array $viewOtherParameters
|
||||||
|
*
|
||||||
|
* @return null|$url
|
||||||
|
*/
|
||||||
public function getSpecificUrl($view, $viewLocale, $viewId = null, $viewOtherParameters = array())
|
public function getSpecificUrl($view, $viewLocale, $viewId = null, $viewOtherParameters = array())
|
||||||
{
|
{
|
||||||
$urlQuery = RewritingUrlQuery::create()
|
$urlQuery = RewritingUrlQuery::create()
|
||||||
->joinRewritingArgument('ra', Criteria::LEFT_JOIN)
|
->joinRewritingArgument('ra', Criteria::LEFT_JOIN)
|
||||||
//->withColumn('`ra`.PARAMETER', 'ra_parameter')
|
|
||||||
//->withColumn('`ra`.VALUE', 'ra_value')
|
|
||||||
->withColumn('`ra`.REWRITING_URL_ID', 'ra_REWRITING_URL_ID')
|
->withColumn('`ra`.REWRITING_URL_ID', 'ra_REWRITING_URL_ID')
|
||||||
->filterByView($view)
|
->filterByView($view)
|
||||||
->filterByViewLocale($viewLocale)
|
->filterByViewLocale($viewLocale)
|
||||||
|
|||||||
Reference in New Issue
Block a user