getRedirected()) { //check if rewriting url alredy exists and put redirect to the new one RewritingUrlQuery::create() ->filterByView($this->getView()) ->filterByViewId($this->getViewId()) ->filterByViewLocale($this->getViewLocale()) ->filterByRedirected($this->getId(), Criteria::NOT_IN) ->update(array( "Redirected" => $this->getId() )); } } }