public function EntityBundlePluginEntityController::query in Entity bundle plugin 7
Overrides EntityAPIController::query().
Overrides EntityAPIController::query
File
- ./
entity_bundle_plugin.controller.inc, line 12 - Entity base controller for EntityBundlePlugin.
Class
- EntityBundlePluginEntityController
- @file Entity base controller for EntityBundlePlugin.
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;
}