Skip to content
Snippets Groups Projects

Add .gitlab-ci.yml to run tests and linting.

Files
11
@@ -3,6 +3,8 @@
namespace Drupal\entity_reference_integrity_enforce\Form;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Config\TypedConfigManagerInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Form\ConfigFormBase;
use Drupal\Core\Form\FormStateInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -21,10 +23,17 @@ class SettingsForm extends ConfigFormBase {
/**
* Create a SettingsForm.
*
* @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
* Defines the configuration object factory.
* @param \Drupal\Core\Config\TypedConfigManagerInterface $typed_config_manager
* The typed config manager.
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
* The entity type manager service.
*/
public function __construct(ConfigFactoryInterface $config_factory, $entity_type_definitions) {
parent::__construct($config_factory);
$this->entityTypeDefinitions = $entity_type_definitions;
public function __construct(ConfigFactoryInterface $config_factory, TypedConfigManagerInterface $typed_config_manager, EntityTypeManagerInterface $entity_type_manager) {
parent::__construct($config_factory, $typed_config_manager);
$this->entityTypeDefinitions = $entity_type_manager->getDefinitions();
}
/**
@@ -33,7 +42,8 @@ class SettingsForm extends ConfigFormBase {
public static function create(ContainerInterface $container) {
return new static(
$container->get('config.factory'),
$container->get('entity_type.manager')->getDefinitions()
$container->get('config.typed'),
$container->get('entity_type.manager'),
);
}
Loading