本文整理匯總了PHP中sfDoctrineRecord::getTable方法的典型用法代碼示例。如果您正苦於以下問題:PHP sfDoctrineRecord::getTable方法的具體用法?PHP sfDoctrineRecord::getTable怎麽用?PHP sfDoctrineRecord::getTable使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類sfDoctrineRecord
的用法示例。
在下文中一共展示了sfDoctrineRecord::getTable方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getLocationPager
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));
}
示例2: siteRedirect
/**
* 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);
}