public function executePopup($request) { $tutorsIds = $request->getParameter('selectedTutorsIds'); if (count($tutorsIds) < 1) { return sfView::NONE; } $this->users = UserPeer::retrieveByPKs(array_slice($tutorsIds, 0, self::MAX_TUTORS_COUNT)); if (count($this->users) < 1) { return sfView::NONE; } $this->tutorsMissingCount = self::MAX_TUTORS_COUNT - count($this->users); }
public function getUserHistory() { $ids = $this->getAttribute('user_history', array()); return UserPeer::retrieveByPKs($ids); }