PathautoServiceProvider.php in Pathauto 8
Namespace
Drupal\pathautoFile
src/PathautoServiceProvider.phpView source
<?php
namespace Drupal\pathauto;
use Drupal\Core\DependencyInjection\ContainerBuilder;
use Drupal\Core\DependencyInjection\ServiceProviderBase;
/**
* Remove the drush commands until path_alias module is enabled.
*/
class PathautoServiceProvider extends ServiceProviderBase {
/**
* {@inheritdoc}
*/
public function register(ContainerBuilder $container) {
$definitions = array_keys($container
->getDefinitions());
if (!in_array('path_alias.repository', $definitions)) {
$container
->removeDefinition('pathauto.commands');
}
}
}
Classes
Name | Description |
---|---|
PathautoServiceProvider | Remove the drush commands until path_alias module is enabled. |