public function deleteById($id, $webRoot) { $filter = FileFilter::create()->getbyId($id); /** @var ActiveRow $file */ $file = $this->databaseStorage->find($filter); if (!$file) { throw new FileNotFoundException('File not found.'); } $this->databaseStorage->deleteById($file->id); FilesystemStorage::deleteFile(self::$mediaStoragePath . DIRECTORY_SEPARATOR . $file->id); /** TODO: Nepředávat webRoot path k media z Manageru do Storage */ FilesystemStorage::deleteFiles(FilesystemStorage::findFiles($webRoot . '/media/', $file->name)); return true; //? }