Pimcore\Model\Asset\Listing\Dao::load PHP Method

load() public method

Get the assets from database
public load ( ) : array
return array
    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;
    }