You are here

public function PathautoServiceProvider::register in Pathauto 8

Registers services to the container.

Parameters

ContainerBuilder $container: The ContainerBuilder to register services to.

Overrides ServiceProviderBase::register

File

src/PathautoServiceProvider.php, line 16

Class

PathautoServiceProvider
Remove the drush commands until path_alias module is enabled.

Namespace

Drupal\pathauto

Code

public function register(ContainerBuilder $container) {
  $definitions = array_keys($container
    ->getDefinitions());
  if (!in_array('path_alias.repository', $definitions)) {
    $container
      ->removeDefinition('pathauto.commands');
  }
}