src/storage/BaseFileSystemStorage.php
public function getFilesArray()
    {
        if ($this->_filesArray === null) {
            $this->_filesArray = $this->getQueryCacheHelper((new Query())->from('{{%admin_storage_file}}')->select(['id', 'is_hidden', 'is_deleted', 'folder_id', 'name_original', 'name_new', 'name_new_compound', 'mime_type', 'extension', 'hash_name', 'hash_file', 'upload_timestamp', 'file_size', 'upload_user_id', 'caption'])->indexBy('id'), self::CACHE_KEY_FILE);
        }

        return $this->_filesArray;
    }
public function getFilesArray()
    {
        if ($this->_filesArray === null) {
            $this->_filesArray = $this->getQueryCacheHelper((new Query())->from('{{%admin_storage_file}}')->select(['id', 'is_hidden', 'is_deleted', 'folder_id', 'name_original', 'name_new', 'name_new_compound', 'mime_type', 'extension', 'hash_name', 'hash_file', 'upload_timestamp', 'file_size', 'upload_user_id', 'caption'])->indexBy('id'), self::CACHE_KEY_FILE);
        }

        return $this->_filesArray;
    }
public function getFilesArray ( ) { if ( $ this -> _filesArray === null ) { $ this -> _filesArray = $ this -> getQueryCacheHelper ( ( new Query ( ) ) -> from ( '{{%admin_storage_file}}' ) -> select ( [ 'id' , 'is_hidden' , 'is_deleted' , 'folder_id' , 'name_original' , 'name_new' , 'name_new_compound' , 'mime_type' , 'extension' , 'hash_name' , 'hash_file' , 'upload_timestamp' , 'file_size' , 'upload_user_id' , 'caption' ] ) -> indexBy ( 'id' ) , self :: CACHE_KEY_FILE ) ; } return $ this -> _filesArray ; }
Get all storage files as an array from database.

This method is used to retrieve all files from the database and indexed by file key.

@return array An array with all storage files indexed by the file id.
Get all storage files as an array from database .