本文整理汇总了PHP中Doctrine_Query::getRootAlias方法的典型用法代码示例。如果您正苦于以下问题:PHP Doctrine_Query::getRootAlias方法的具体用法?PHP Doctrine_Query::getRootAlias怎么用?PHP Doctrine_Query::getRootAlias使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Doctrine_Query
的用法示例。
在下文中一共展示了Doctrine_Query::getRootAlias方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addStatutColumnQuery
protected function addStatutColumnQuery(Doctrine_Query $query, $field, $value)
{
if ($value == 0) {
$query->andWhere($query->getRootAlias() . '.statut <> ?', $value);
}
if ($value != 0) {
$query->andWhere($query->getRootAlias() . '.statut = ?', $value);
}
}
示例2: addRangeQuery
public function addRangeQuery(Doctrine_Query $query, $field, $values)
{
$fieldName = $this->getFieldName($field);
if ($values['from']) {
$query->andWhere(sprintf('%s.%s >= ?', $query->getRootAlias(), $fieldName), $values['from']);
}
if ($values['to']) {
$query->andWhere(sprintf('%s.%s <= ?', $query->getRootAlias(), $fieldName), $values['to']);
}
}
示例3: retrieveFolderList
public function retrieveFolderList(Doctrine_Query $q)
{
$alias = $q->getRootAlias();
$q->leftJoin($alias . '.Assets a');
$q->orderBy($alias . '.lft');
return $q;
}
示例4: listPeriodeFiliereRegion
public function listPeriodeFiliereRegion(Doctrine_Query $q)
{
$rootAlias = $q->getRootAlias();
$q->leftJoin($rootAlias . '.CopisimFiliere c');
$q->leftJoin($rootAlias . '.CopisimRegion d');
return $q;
}
示例5: retrieveAsso
public function retrieveAsso(Doctrine_Query $q)
{
$alias = $q->getRootAlias();
$q->select("{$alias}.name, {$alias}.login, {$alias}.description, {$alias}.logo, {$alias}.salle, {$alias}.phone, {$alias}.facebook, p.id, p.asso_id, p.couleur");
$q->leftJoin("{$alias}.Pole p");
return $q->fetchOne();
}
示例6: retrieveBackendUuserList
/**
* Query for uuser list
* @param Doctrine_Query $q
* @return Doctrine_Query
*/
public function retrieveBackendUuserList(Doctrine_Query $q)
{
$rootAlias = $q->getRootAlias();
$q->leftJoin($rootAlias . '.BalanceUser bu');
$q->andWhere($rootAlias . '.utype=?', 'uuser');
$q->andWhere($rootAlias . '.password IS NOT NULL');
return $q;
}
示例7: addCallerIdColumnQuery
public function addCallerIdColumnQuery(Doctrine_Query $query, $field, $values)
{
if ($values != "") {
$alias = $query->getRootAlias();
$query->andWhere($alias . '.id != ?', $values);
}
return $query;
}
示例8: addVisiteurIdColumnQuery
public function addVisiteurIdColumnQuery(Doctrine_Query $query, $field, $value)
{
//Pour le xxxx tu peux utiliser $query->getRootAlias() pour récupérer l'alias racine de ta requete
if ($value['text']) {
$query->leftjoin($query->getRootAlias() . ".Visiteur v");
$query->andWhere('v.pseudo_son like ?', "%" . $value['text'] . "%");
}
}
示例9: retrieveAdminChargeList
public function retrieveAdminChargeList(Doctrine_Query $q)
{
$rootAlias = $q->getRootAlias();
$q->leftJoin($rootAlias . '.Category ct');
$q->leftJoin($rootAlias . '.Vehicle v');
$q->andWhere('v.is_archived = ?', false);
return $q;
}
示例10: getAdminQuery
public function getAdminQuery(Doctrine_Query $q)
{
$ra = $q->getRootAlias($q);
if(vjComment::isGuardBindEnabled())
{
$q->leftJoin($ra . '.User u');
}
return $q;
}
示例11: addCoachesListColumnQuery
public function addCoachesListColumnQuery(Doctrine_Query $query, $field, $values)
{
if (!is_array($values)) {
$values = array($values);
}
if (!count($values)) {
return;
}
$query->leftJoin($query->getRootAlias() . '.ClassPerCoach ClassPerCoach')->andWhereIn('ClassPerCoach.coach_id', $values);
}
示例12: addChannelsListColumnQuery
public function addChannelsListColumnQuery(Doctrine_Query $query, $field, $values)
{
if (!is_array($values)) {
$values = array($values);
}
if (!count($values)) {
return;
}
$query->leftJoin($query->getRootAlias() . '.ChannelProgram ChannelProgram')->andWhereIn('ChannelProgram.channel_id', $values);
}
示例13: addPermissionsListColumnQuery
public function addPermissionsListColumnQuery(Doctrine_Query $query, $field, $values)
{
if (!is_array($values)) {
$values = array($values);
}
if (!count($values)) {
return;
}
$query->leftJoin($query->getRootAlias() . '.sfGuardUserPermission sfGuardUserPermission')->andWhereIn('sfGuardUserPermission.permission_id', $values);
}
示例14: addAccepterListColumnQuery
public function addAccepterListColumnQuery(Doctrine_Query $query, $field, $values)
{
if (!is_array($values)) {
$values = array($values);
}
if (!count($values)) {
return;
}
$query->leftJoin($query->getRootAlias() . '.Friend Friend')->andWhereIn('Friend.accepter_id', $values);
}
示例15: addVehiclesListColumnQuery
public function addVehiclesListColumnQuery(Doctrine_Query $query, $field, $values)
{
if (!is_array($values)) {
$values = array($values);
}
if (!count($values)) {
return;
}
$query->leftJoin($query->getRootAlias() . '.ReportVehicle ReportVehicle')->andWhereIn('ReportVehicle.vehicle_id', $values);
}