public function Campaigns::loadAll in SimpleAds 8
1 call to Campaigns::loadAll()
File
- src/
Campaigns.php, line 124
Class
- Campaigns
- Campaigns utility class.
Namespace
Drupal\simpleadsCode
public function loadAll() {
$items = [];
$result = db_select('simpleads_campaigns', 's')
->fields('s')
->orderBy('s.changed_at', 'DESC')
->execute();
foreach ($result as $row) {
$items[] = $this
->setId($row->id)
->load();
}
return $items;
}