Loading redirect.install +5 −5 Original line number Diff line number Diff line Loading @@ -5,14 +5,14 @@ * Update hooks for the Redirect module. */ use Drupal\redirect\Entity\Redirect; use Drupal\Core\Config\FileStorage; use Drupal\Core\Config\InstallStorage; use Drupal\Core\Database\Database; use Drupal\redirect\Entity\Redirect; use Drupal\system\Entity\Action; use Drupal\user\Entity\Role; use Drupal\views\Entity\View; use Symfony\Component\Yaml\Yaml; use Drupal\Core\Config\InstallStorage; use Drupal\Core\Config\FileStorage; use Drupal\user\Entity\Role; /** * Rehash redirects to account for case insensitivity. Loading Loading @@ -145,7 +145,7 @@ function redirect_update_8103() { // Only create if the redirect view doesn't exist and views is enabled. if (!View::load('redirect') && \Drupal::moduleHandler()->moduleExists('views')) { $config_path = drupal_get_path('module', 'redirect') . '/config/install/views.view.redirect.yml'; $data = Yaml::parse($config_path); $data = Yaml::parse(file_get_contents($config_path)); \Drupal::configFactory()->getEditable('views.view.redirect')->setData($data)->save(TRUE); $message = 'The new redirect view has been created.'; } Loading Loading
redirect.install +5 −5 Original line number Diff line number Diff line Loading @@ -5,14 +5,14 @@ * Update hooks for the Redirect module. */ use Drupal\redirect\Entity\Redirect; use Drupal\Core\Config\FileStorage; use Drupal\Core\Config\InstallStorage; use Drupal\Core\Database\Database; use Drupal\redirect\Entity\Redirect; use Drupal\system\Entity\Action; use Drupal\user\Entity\Role; use Drupal\views\Entity\View; use Symfony\Component\Yaml\Yaml; use Drupal\Core\Config\InstallStorage; use Drupal\Core\Config\FileStorage; use Drupal\user\Entity\Role; /** * Rehash redirects to account for case insensitivity. Loading Loading @@ -145,7 +145,7 @@ function redirect_update_8103() { // Only create if the redirect view doesn't exist and views is enabled. if (!View::load('redirect') && \Drupal::moduleHandler()->moduleExists('views')) { $config_path = drupal_get_path('module', 'redirect') . '/config/install/views.view.redirect.yml'; $data = Yaml::parse($config_path); $data = Yaml::parse(file_get_contents($config_path)); \Drupal::configFactory()->getEditable('views.view.redirect')->setData($data)->save(TRUE); $message = 'The new redirect view has been created.'; } Loading