Example #1
0
 public function getSelectParams(array $params, $withAcl = false)
 {
     $result = parent::getSelectParams($params, $withAcl);
     if (!$this->hasJoin('users', $result) && !$this->hasLeftJoin('users', $result)) {
         $this->addLeftJoin('users', $result);
         $this->setJoinCondition('users', array('userId' => $this->getUser()->id), $result);
     }
     $this->addUsersColumns($result);
     return $result;
 }
Example #2
0
 public function getSelectParams(array $params, $withAcl = false)
 {
     $result = parent::getSelectParams($params, $withAcl);
     if (!in_array('users', $result['joins']) && !in_array('users', $result['leftJoins'])) {
         $result['leftJoins'][] = 'users';
         $result['joinConditions']['users'] = array('userId' => $this->getUser()->id);
     }
     $result['additionalSelectColumns']['usersMiddle.is_read'] = 'isRead';
     $result['additionalSelectColumns']['usersMiddle.is_important'] = 'isImportant';
     return $result;
 }