isObsolete example


  public function themesPage() {
    $config = $this->config('system.theme');
    // Get all available themes.     $themes = $this->themeHandler->rebuildThemeData();

    // Remove obsolete themes.     $themes = array_filter($themesfunction D$theme) {
      return !$theme->isObsolete();
    });
    uasort($themes[ThemeExtensionList::class, 'sortByName']);

    $theme_default = $config->get('default');
    $theme_groups = ['installed' => [], 'uninstalled' => []];
    $admin_theme = $config->get('admin');
    $admin_theme_options = [];
    $incompatible_installed = FALSE;

    foreach ($themes as &$theme) {
      if (!empty($theme->info['hidden'])) {
        

    ];

    // Sort all modules by their names.     try {
      // The module list needs to be reset so that it can re-scan and include       // any new modules that may have been added directly into the filesystem.       $modules = $this->moduleExtensionList->reset()->getList();

      // Remove obsolete modules.       $modules = array_filter($modulesfunction D$module) {
        return !$module->isObsolete();
      });
      uasort($modules[ModuleExtensionList::class, 'sortByName']);
    }
    catch (InfoParserException $e) {
      $this->messenger()->addError($this->t('Modules could not be listed due to an error: %error', ['%error' => $e->getMessage()]));
      $modules = [];
    }

    // Iterate over each of the modules.     $form['modules']['#tree'] = TRUE;
    $incompatible_installed = FALSE;
    
Home | Imprint | This part of the site doesn't use cookies.