Yaffs site version 1.1
[yaffs-website] / web / modules / contrib / superfish / superfish.install
index 76a34233e80bbb706a52eba1b5f6e3763d43e912..dcdfb92c0b93a5b309450d6aa19573e6326c53a7 100644 (file)
@@ -5,16 +5,15 @@
  * Install, update and uninstall functions for the Superfish module.
  */
 
-use Drupal\Core\Language\Language;
-
 /**
  * Implements hook_enable().
  */
 function superfish_install() {
-  if (superfish_library_check()){
-    drupal_set_message(t('In order to use Superfish, go to the <a href="@block">Block layout</a> page and use any of the "Place block" buttons to create a Superfish block.', array('@block' => 'structure/block')));
-  } else {
-    drupal_set_message(t('Superfish library is missing. Please refer to the <a href="@documentation">plugin documentation</a> for how you can fix this issue; Once done, go to the <a href="@block">Block layout</a> page and use any of the "Place block" buttons to create a Superfish block.', array('@documentation' => 'http://drupal.org/node/1125896', '@block' => 'structure/block')), 'warning');
+  if (superfish_library_check()) {
+    drupal_set_message(t('In order to use Superfish, go to the <a href="@block">Block layout</a> page and use any of the "Place block" buttons to create a Superfish block.', ['@block' => 'structure/block']));
+  }
+  else {
+    drupal_set_message(t('Superfish library is missing. Please refer to the <a href="@documentation">plugin documentation</a> for how you can fix this issue; Once done, go to the <a href="@block">Block layout</a> page and use any of the "Place block" buttons to create a Superfish block.', ['@documentation' => 'http://drupal.org/node/1125896', '@block' => 'structure/block']), 'warning');
   }
 }
 
@@ -22,25 +21,25 @@ function superfish_install() {
  * Implements hook_requirements().
  */
 function superfish_requirements($phase) {
-  $requirements = array();
+  $requirements = [];
   if ($phase == 'runtime') {
     $requirements['superfish']['title'] = t('Superfish library');
 
     if (superfish_library_check()) {
-      $requirements['superfish']['value'] = t('Installed at @location', array('@location' => superfish_library_path()));
+      $requirements['superfish']['value'] = t('Installed at @location', ['@location' => superfish_library_path()]);
       $requirements['superfish']['severity'] = REQUIREMENT_OK;
     }
     else {
       $requirements['superfish']['value'] = t('Not installed');
       $requirements['superfish']['severity'] = REQUIREMENT_ERROR;
-      $requirements['superfish']['description'] = t('Please download the Superfish library from :url.', array(':url' => 'http://drupal.org/project/superfish'));
+      $requirements['superfish']['description'] = t('Please download the Superfish library from :url.', [':url' => 'http://drupal.org/project/superfish']);
     }
 
     // Check the uploaded Superfish library version.
     if (($version = superfish_library_version()) && $version != '2.0') {
       $requirements['superfish']['value'] = t('Not supported');
       $requirements['superfish']['severity'] = REQUIREMENT_ERROR;
-      $requirements['superfish']['description'] = t('The Superfish library requires an update. You can find the update instructions on :url.', array(':url' => 'http://drupal.org/project/superfish'));
+      $requirements['superfish']['description'] = t('The Superfish library requires an update. You can find the update instructions on :url.', [':url' => 'http://drupal.org/project/superfish']);
     }
   }
   return $requirements;