diff --git a/core/modules/language/src/Form/ContentLanguageSettingsForm.php b/core/modules/language/src/Form/ContentLanguageSettingsForm.php index 1e89850..13d15e9 100644 --- a/core/modules/language/src/Form/ContentLanguageSettingsForm.php +++ b/core/modules/language/src/Form/ContentLanguageSettingsForm.php @@ -7,9 +7,8 @@ namespace Drupal\language\Form; -use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Entity\EntityManagerInterface; -use Drupal\Core\Form\ConfigFormBase; +use Drupal\Core\Form\FormBase; use Drupal\Core\Form\FormStateInterface; use Drupal\language\Entity\ContentLanguageSettings; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -17,7 +16,7 @@ /** * Configure the content language settings for this site. */ -class ContentLanguageSettingsForm extends ConfigFormBase { +class ContentLanguageSettingsForm extends FormBase { /** * The entity manager. @@ -29,14 +28,10 @@ class ContentLanguageSettingsForm extends ConfigFormBase { /** * Constructs a ContentLanguageSettingsForm object. * - * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory - * The config factory. * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager * The entity manager. */ - public function __construct(ConfigFactoryInterface $config_factory, EntityManagerInterface $entity_manager) { - parent::__construct($config_factory); - + public function __construct(EntityManagerInterface $entity_manager) { $this->entityManager = $entity_manager; } @@ -45,7 +40,6 @@ public function __construct(ConfigFactoryInterface $config_factory, EntityManage */ public static function create(ContainerInterface $container) { return new static( - $container->get('config.factory'), $container->get('entity.manager') ); } @@ -136,7 +130,12 @@ public function buildForm(array $form, FormStateInterface $form_state) { } } - $form = parent::buildForm($form, $form_state); + $form['actions']['#type'] = 'actions'; + $form['actions']['submit'] = array( + '#type' => 'submit', + '#value' => $this->t('Save configuration'), + '#button_type' => 'primary', + ); return $form; }