You are here

public function FileManager::restore in Minify JS 8

Same name and namespace in other branches
  1. 8.2 src/Controller/FileManager.php \Drupal\minifyjs\Controller\FileManager::restore()

Remove the minified version of a single file (restore it).

Parameters

stdClass $file:

Return value

\Symfony\Component\HttpFoundation\RedirectResponse Returns a redirect to the manage javascript page.

1 string reference to 'FileManager::restore'
minifyjs.routing.yml in ./minifyjs.routing.yml
minifyjs.routing.yml

File

src/Controller/FileManager.php, line 42

Class

FileManager
Controller routines for minifyjs routes.

Namespace

Drupal\minifyjs\Controller

Code

public function restore($file) {
  $result = minifyjs_remove_minified_file($file, TRUE);
  if ($result === TRUE) {
    drupal_set_message(t('File was restored successfully.'));
  }
  else {
    drupal_set_message($result, 'error');
  }
  return $this
    ->redirect('minifyjs.manage');
}