public function load($staff_id)
 {
     $data = $this->wpdb->get_results('
         SELECT c.name AS category_name, s.*
         FROM ab_category c
         INNER JOIN ab_service s ON c.id = s.category_id
     ', ARRAY_A);
     if (!$data) {
         $data = array();
     }
     $uncategorized_services = $this->wpdb->get_results('SELECT * FROM ab_service WHERE category_id IS NULL');
     foreach ($uncategorized_services as $uncategorized_service) {
         $abService = new AB_Service();
         $abService->setData($uncategorized_service);
         $this->uncategorized_services[] = $abService;
     }
     $rows = $this->wpdb->get_results($this->wpdb->prepare('
         SELECT s.service_id, s.price, s.capacity
         FROM ab_staff_service s
         WHERE s.staff_id = %d
     ', $staff_id));
     if ($rows) {
         foreach ($rows as $row) {
             $this->selected[$row->service_id] = array('price' => $row->price, 'capacity' => $row->capacity);
         }
     }
     foreach ($data as $row) {
         if (!isset($this->collection[$row['category_id']])) {
             $abCategory = new AB_Category();
             $abCategory->set('id', $row['category_id']);
             $abCategory->set('name', $row['category_name']);
             $this->collection[$row['category_id']] = $abCategory;
         }
         unset($row['category_name']);
         $abService = new AB_Service();
         $abService->setData($row);
         $this->category_services[$row['category_id']][] = $abService->get('id');
         $this->collection[$row['category_id']]->addService($abService);
     }
 }