You are here

public function ServiceContainerServiceProvider::moduleExists in Service Container 7

Same name and namespace in other branches
  1. 7.2 src/ServiceContainer/ServiceProvider/ServiceContainerServiceProvider.php \Drupal\service_container\ServiceContainer\ServiceProvider\ServiceContainerServiceProvider::moduleExists()

Determines whether a given module exists.

Parameters

string $name: The name of the module (without the .module extension).

Return value

bool TRUE if the module is both installed and enabled, FALSE otherwise.

1 call to ServiceContainerServiceProvider::moduleExists()
ServiceContainerServiceProvider::alterContainerDefinition in src/ServiceContainer/ServiceProvider/ServiceContainerServiceProvider.php
Allows to alter the container definition.

File

src/ServiceContainer/ServiceProvider/ServiceContainerServiceProvider.php, line 396
Contains \Drupal\service_container\ServiceContainer\ServiceProvider\ServiceContainerServiceProvider

Class

ServiceContainerServiceProvider
Provides render cache service definitions.

Namespace

Drupal\service_container\ServiceContainer\ServiceProvider

Code

public function moduleExists($name) {
  return module_exists($name);
}