public function getCategoryExclusionNames($uid) { $data = $this->getCategoryExclusion($uid); $db = new DB(); $category = new Category(); $data = $category->getByIds($data); $ret = array(); foreach ($data as $d) { $ret[] = $d["title"]; } return $ret; }
/** * Get list of category names excluded by the user. * * @param int $userID ID of the user. * * @return array */ public function getCategoryExclusionNames($userID) { $data = $this->getCategoryExclusion($userID); $category = new Category(['Settings' => $this->pdo]); $categories = $category->getByIds($data); $ret = array(); if ($categories !== false) { foreach ($categories as $cat) { $ret[] = $cat["title"]; } } return $ret; }