private function getLocationPager(sfWebRequest $request, sfDoctrineRecord $part, $partUrl) { return htPagerLayout::create(Doctrine::getTable('Location')->getVisibleLocationsQuery($this->getUser())->leftJoin('l.Address a')->leftJoin('a.' . $part->getTable()->getComponentName() . ' part')->leftJoin('l.CreatedBy p')->leftJoin('l.VoteLocation v')->leftJoin('l.CommentLocation c')->leftJoin('l.Profit pr')->leftJoin('pr.ProfitDetail pd')->leftJoin('pd.Fish')->andWhere('part.id = ?', $part->getId()), 'address/' . $partUrl . '?id=' . $part->getId() . '&page={%page_number}', $request->getParameter('page', 1)); }
/** * Note: Deprecated in favour of rtSiteToolkit::checkSiteReference() * * A passing mechanism to provide site aware redirects. * * @param sfDoctrineRecord $object * @param string $route */ public static function siteRedirect(sfDoctrineRecord $object, $route = null) { $context = sfContext::getInstance(); if (is_null($route)) { $route = $object->getTable()->getTableName() . '_show'; } $protocol = $context->getRequest()->isSecure() ? 'https://' : 'http://'; $domain = rtSiteToolkit::getCurrentDomain(); if (rtSiteToolkit::isMultiSiteEnabled() && $object->rtSite && !is_null($object->rtSite->getDomain())) { $domain = $object->rtSite->getDomain(); } $route = $context->getRouting()->generate($route, $object); $context->getController()->redirect($protocol . $domain . $route); }