Skip to content
Snippets Groups Projects

Issue #3451923: Add new contructor property to EmeSettingsForm

Merged Zoltan Attila Horvath requested to merge issue/eme-3451923:3451923-drupal-11 into 1.0.x
Files
5
+ 13
13
@@ -5,6 +5,7 @@ namespace Drupal\eme\Form;
use Drupal\Core\Ajax\AjaxResponse;
use Drupal\Core\Ajax\ReplaceCommand;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Config\TypedConfigManagerInterface;
use Drupal\Core\Entity\ContentEntityType;
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;
@@ -18,24 +19,22 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
*/
class EmeSettingsForm extends ConfigFormBase {
/**
* The entity type manager.
*
* @var \Drupal\Core\Entity\EntityTypeManagerInterface
*/
protected $entityTypeManager;
/**
* Constructs an Entity Export settings form.
*
* @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
* @param \Drupal\Core\Config\ConfigFactoryInterface $configFactory
* The factory for configuration objects.
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager
* The entity type manager.
* @param \Drupal\Core\Config\TypedConfigManagerInterface $typedConfigManager
* The typed config manager.
*/
public function __construct(ConfigFactoryInterface $config_factory, EntityTypeManagerInterface $entity_type_manager) {
parent::__construct($config_factory);
$this->entityTypeManager = $entity_type_manager;
public function __construct(
ConfigFactoryInterface $configFactory,
protected EntityTypeManagerInterface $entityTypeManager,
TypedConfigManagerInterface $typedConfigManager,
) {
parent::__construct($configFactory, $typedConfigManager);
}
/**
@@ -44,7 +43,8 @@ class EmeSettingsForm extends ConfigFormBase {
public static function create(ContainerInterface $container) {
return new static(
$container->get('config.factory'),
$container->get('entity_type.manager')
$container->get('entity_type.manager'),
$container->get('config.typed'),
);
}
Loading