You are here

public function UltimenuManager::removeRegions in Ultimenu 8

Same name and namespace in other branches
  1. 8.2 src/UltimenuManager.php \Drupal\ultimenu\UltimenuManager::removeRegions()

Returns unwanted Ultimenu regions for removal from theme .info.yml.

When a menu item disabled or deleted, relevant dynamic Ultimenu regions removed from the system, but theme .info.yml has a copy stored there. System will always keep and display the unwanted. Either manual deletion from .info.yml, or a force removal if so configured.

Return value

array|bool The array of unwanted Ultimenu regions from theme .info.yml, or FALSE.

Overrides UltimenuManagerInterface::removeRegions

File

src/UltimenuManager.php, line 578

Class

UltimenuManager
Manages Ultimenu plugin.

Namespace

Drupal\ultimenu

Code

public function removeRegions() {
  $goodies = $this
    ->getSetting('goodies');
  if (!empty($goodies['force-remove-region']) && ($theme_regions = $this
    ->parseThemeInfo())) {
    return $theme_regions;
  }
  return FALSE;
}