/** * Get the registered dashlet list of a determined user. * @param \User $user * @return array */ public function getDashletsByUser($user) { $orderBy = ""; $where = "category='HOME' AND assigned_user_id='{$user->id}'"; $preferences = $this->preferenceRetriever->get_full_list($orderBy, $where); $result = array(); if (!empty($preferences)) { foreach ($preferences as $preference) { $result[] = $this->processDashletData($preference->assigned_user_id, $preference->contents); } } return $result; }