protected function Tracker::setTrackAllMenus in Menu Entity Index 8
Sets all menus option to track and update database table accordingly.
Parameters
bool $force: Retrack all tracked menus, even if configuration didn't change. Default is FALSE.
1 call to Tracker::setTrackAllMenus()
- Tracker::setConfiguration in src/
Tracker.php - Sets configuration values and triggers rescanning of menus as needed.
File
- src/
Tracker.php, line 253
Class
- Tracker
- Tracks menu links and their referenced entities.
Namespace
Drupal\menu_entity_indexCode
protected function setTrackAllMenus($force = FALSE) {
$old_value = $this->config
->get('all_menus');
$this->configFactory
->getEditable('menu_entity_index.configuration')
->set('all_menus', TRUE)
->set('menus', [])
->save();
if (!$old_value || $force) {
$this
->untrackMenus($this
->getTrackedMenus());
$this
->trackMenus($this
->getTrackedMenus());
}
}