You are here

public function CourseObjectController::query in Course 7.2

Same name and namespace in other branches
  1. 7 includes/CourseObjectController.inc \CourseObjectController::query()

Overrides EntityAPIController::query().

Overrides EntityAPIController::query

File

includes/CourseObjectController.inc, line 8

Class

CourseObjectController

Code

public function query($ids, $conditions, $revision_id = FALSE) {
  $query = $this
    ->buildQuery($ids, $conditions, $revision_id);
  $result = $query
    ->execute();
  $result
    ->setFetchMode(PDO::FETCH_ASSOC);

  // Build the resulting objects ourselves, since the standard PDO ways of
  // doing that are completely useless.
  $objects = array();
  foreach ($result as $row) {
    $row['is_new'] = FALSE;
    $objects[] = $this
      ->create($row);
  }
  return $objects;
}