public function deleteFile(array $routes) { $basePath = Yii::getAlias($routes['basePath']); $filePath = "{$basePath}/{$this->url}"; return is_file($filePath) ? unlink($filePath) : false; }