public function load()
{
$assets = [];
$select = (string) $this->getQuery(['id', "type"]);
$assetsData = $this->db->fetchAll($select, $this->model->getConditionVariables());
foreach ($assetsData as $assetData) {
if ($assetData["type"]) {
if ($asset = Model\Asset::getById($assetData["id"])) {
$assets[] = $asset;
}
}
}
$this->model->setAssets($assets);
return $assets;
}