本文整理汇总了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);
}