Ejemplo n.º 1
0
 public function getCategories()
 {
     if (null !== $this->categories) {
         return $this->categories;
     }
     if (null === $this->id) {
         return null;
     }
     $stmt = \CW::$app->db->executeQuery('SELECT `category_id` FROM `user_categories` WHERE `user_id` = ' . $this->id);
     $result = $stmt->fetchAll(\PDO::FETCH_NUM);
     return \components\helpers\ArrayHelper::column($result, 'category_id');
 }