/** * Replicates module_list($refresh, $bootstrap_refresh, $sort, NULL) * * @see module_list() * * @param bool $refresh * @param bool $bootstrap_refresh * @param bool $sort * * @return string[] */ function moduleList($refresh = FALSE, $bootstrap_refresh = FALSE, $sort = FALSE) { if (empty($this->list) || $refresh) { $this->list = array(); $sorted_list = NULL; if ($refresh) { // For the $refresh case, make sure that system_list() returns fresh // data. $this->drupalStatic->resetKey('system_list'); } if ($bootstrap_refresh) { $this->list = $this->systemList->systemListBootstrap(); } else { // Not using drupal_map_assoc() here as that requires common.inc. $this->list = array_keys($this->systemList->systemListModuleEnabled()); $this->list = !empty($this->list) ? array_combine($this->list, $this->list) : array(); } } if ($sort) { return $this->moduleListSorted(); } if (count($this->list)) { # HackyLog::log($this->list); } return $this->list; }
/** * @see system_list_reset() */ function systemListReset() { $this->drupalStatic->resetKey('system_list'); $this->drupalStatic->resetKey('system_rebuild_module_data'); $this->drupalStatic->resetKey('list_themes'); $this->cache->cacheClearAll('bootstrap_modules', 'cache_bootstrap'); $this->cache->cacheClearAll('system_list', 'cache_bootstrap'); }
/** * Replicates module_implements(*, *, TRUE) * * @see module_implements() * * @return null */ function reset() { // Use the advanced drupal_static() pattern, since this is called very often. if (!isset($this->drupalStaticFast)) { $this->drupalStaticFast['implementations'] =& $this->drupalStatic->get('module_implements'); } $implementations =& $this->drupalStaticFast['implementations']; $implementations = array(); $this->cache->cacheSet('module_implements', array(), 'cache_bootstrap'); $this->drupalStatic->resetKey('module_hook_info'); $this->drupalStatic->resetKey('drupal_alter'); $this->cache->cacheClearAll('hook_info', 'cache_bootstrap'); return NULL; }
public function resetLibrariesInfo() { $this->drupalStatic->resetKey('libraries_info'); }