public static function Asset::loadAll in Mini site 8
Load all assets.
Return value
\Drupal\minisite\Asset[] Array of all available assets.
Overrides AssetInterface::loadAll
1 call to Asset::loadAll()
- AssetTest::testLoadAll in tests/
src/ Functional/ AssetTest.php - Test Asset::save().
File
- src/
Asset.php, line 242
Class
- Asset
- Class Asset.
Namespace
Drupal\minisiteCode
public static function loadAll() {
$values = Database::getConnection()
->select('minisite_asset', 'ma')
->fields('ma')
->orderBy('id', 'DESC')
->execute()
->fetchAllAssoc('id', \PDO::FETCH_ASSOC);
$assets = [];
foreach ($values as $value) {
$assets[] = self::fromValues($value);
}
return $assets;
}