/** * Constructor * * @param mixed $categoryId null or valid category identifier * @param mixed $userId null or valid user identifier * @return ClaroCategoriesBrowser object */ function ClaroCategoriesBrowser($categoryId = null, $userId = null) { $this->categoryId = $categoryId; $this->userId = $userId; $this->currentCategory = new claroCategory(); $this->currentCategory->load($categoryId); $this->categoriesList = claroCategory::getCategories($categoryId, 1); $this->coursesList = claroCourse::getRestrictedCourses($categoryId, $userId); }
/** * Constructor * * @param mixed $categoryId null or valid category identifier * @param mixed $userId null or valid user identifier */ public function __construct($categoryId = null, $userId = null) { $this->categoryId = $categoryId; $this->userId = $userId; $this->currentCategory = new claroCategory(); $this->currentCategory->load($categoryId); $this->categoryList = claroCategory::getCategories($categoryId, 1); $this->coursesList = claroCourse::getRestrictedCourses($categoryId, $userId); $this->viewOptions = new CourseTreeViewOptions(); }