Skip to content
Snippets Groups Projects

Draft: Resolve #3458109 "Make code pass"

1 unresolved thread
Files
6
+ 4
20
@@ -2,8 +2,6 @@
namespace Drupal\rest_menu_items\Form;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Form\ConfigFormBase;
use Drupal\Core\Form\FormStateInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -20,28 +18,14 @@ class ConfigForm extends ConfigFormBase {
*/
protected $menuStorage;
/**
* ConfigForm constructor.
*
* @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
* The factory for configuration objects.
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
* The entity type manager;
*/
public function __construct(ConfigFactoryInterface $config_factory,
EntityTypeManagerInterface $entity_type_manager) {
parent::__construct($config_factory);
$this->menuStorage = $entity_type_manager->getStorage('menu');
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container) {
return new static(
$container->get('config.factory'),
$container->get('entity_type.manager')
);
$instance = parent::create($container);
$instance->menuStorage = $container->get('entity_type.manager');
return $instance;
}
/**
Loading