Example #1
0
 protected function casteJoins()
 {
     $joins = array();
     if ($this->with_caste) {
         $joins['c'] = PlSqlJoin::inner('castes', '$ME.cid = n.target');
     }
     return $joins;
 }
Example #2
0
 protected function groupJoins()
 {
     $joins = array();
     if ($this->with_groups > 0) {
         for ($i = 1; $i <= $this->with_groups; $i++) {
             $joins['rg' . $i] = PlSqlJoin::inner('rooms_groups', '$ME.rid = r.rid');
         }
     }
     return $joins;
 }
Example #3
0
 protected function activityInstanceJoins()
 {
     $joins = array();
     if ($this->with_activityinstances > 0) {
         for ($i = 1; $i <= $this->with_activityinstances; $i++) {
             $joins['ai' . $i] = PlSqlJoin::inner('activities_participants', '$ME.participant = a.uid');
         }
     }
     return $joins;
 }
Example #4
0
 /** Since this method might perform inner joins on tables which have been
  * joined previously (e.g when using addVisibilityFieldFilter), it has to
  * come after the Joins() methods for those tables.
  * This is due to the implementation logic for discovering joins and the
  * ordering used by PHP introspection.
  */
 protected function visibilityJoins()
 {
     $joins = array();
     foreach ($this->vlevels as $level => $sub) {
         $joins[$sub] = PlSqlJoin::inner('profile_visibility_enum', '$ME.access_level = {?}', $level);
     }
     foreach ($this->vfields as $field => $sub) {
         $joins[$sub] = PlSqlJoin::inner('profile_visibility_enum', '$ME.access_level = ' . $field);
     }
     return $joins;
 }
 protected function participantsJoins()
 {
     $joins = array();
     if ($this->with_participants) {
         $joins['ap'] = PlSqlJoin::inner('activities_participants', '$ME.id = ai.id');
     }
     return $joins;
 }