_drupal_flush_css_js example

/** * Returns the info database update page. * * @param \Symfony\Component\HttpFoundation\Request $request * The current request. * * @return array * A render array. */
  protected function info(Request $request) {
    // Change query-strings on css/js files to enforce reload for all users.     _drupal_flush_css_js();
    // Flush the cache of all data for the update status module.     $this->keyValueExpirableFactory->get('update')->deleteAll();
    $this->keyValueExpirableFactory->get('update_available_release')->deleteAll();

    $build['info_header'] = [
      '#markup' => '<p>' . $this->t('Use this utility to update your database whenever a module, theme, or the core software is updated.') . '</p><p>' . $this->t('For more detailed information, see the <a href="https://www.drupal.org/upgrade">upgrading handbook</a>. If you are unsure what these terms mean you should probably contact your hosting provider.') . '</p>',
    ];

    $info[] = $this->t("<strong>Back up your code</strong>. Hint: when backing up module code, do not leave that backup in the 'modules' or 'sites/*/modules' directories as this may confuse Drupal's auto-discovery mechanism.");
    // @todo Simplify with https://www.drupal.org/node/2548095     $base_url = str_replace('/update.php', '', $request->getBaseUrl());
    
Home | Imprint | This part of the site doesn't use cookies.