Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
300
Merge Requests
300
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
26dfabc3
Commit
26dfabc3
authored
Dec 19, 2014
by
catch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#2393765
by alexpott: Several forms should use ConfigFormBase and not FormBase
parent
bf38b66f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
8 deletions
+9
-8
core/lib/Drupal/Core/Installer/Form/SiteConfigureForm.php
core/lib/Drupal/Core/Installer/Form/SiteConfigureForm.php
+2
-2
core/modules/language/src/Form/NegotiationConfigureForm.php
core/modules/language/src/Form/NegotiationConfigureForm.php
+4
-3
core/modules/system/src/Form/ThemeAdminForm.php
core/modules/system/src/Form/ThemeAdminForm.php
+3
-3
No files found.
core/lib/Drupal/Core/Installer/Form/SiteConfigureForm.php
View file @
26dfabc3
...
...
@@ -8,7 +8,7 @@
namespace
Drupal\Core\Installer\Form
;
use
Drupal\Core\Extension\ModuleInstallerInterface
;
use
Drupal\Core\Form\FormBase
;
use
Drupal\Core\Form\
Config
FormBase
;
use
Drupal\Core\Form\FormStateInterface
;
use
Drupal\Core\Locale\CountryManagerInterface
;
use
Drupal\Core\State\StateInterface
;
...
...
@@ -18,7 +18,7 @@
/**
* Provides the site configuration form.
*/
class
SiteConfigureForm
extends
FormBase
{
class
SiteConfigureForm
extends
Config
FormBase
{
/**
* The user storage.
...
...
core/modules/language/src/Form/NegotiationConfigureForm.php
View file @
26dfabc3
...
...
@@ -14,7 +14,7 @@
use
Drupal\Core\Config\ConfigFactoryInterface
;
use
Drupal\Core\Entity\EntityStorageInterface
;
use
Drupal\Core\Extension\ThemeHandlerInterface
;
use
Drupal\Core\Form\FormBase
;
use
Drupal\Core\Form\
Config
FormBase
;
use
Drupal\Core\Form\FormStateInterface
;
use
Drupal\Core\Url
;
use
Drupal\language\ConfigurableLanguageManagerInterface
;
...
...
@@ -25,7 +25,7 @@
/**
* Configure the selected language negotiation method for this site.
*/
class
NegotiationConfigureForm
extends
FormBase
{
class
NegotiationConfigureForm
extends
Config
FormBase
{
/**
* Stores the configuration object for language.types.
...
...
@@ -86,7 +86,8 @@ class NegotiationConfigureForm extends FormBase {
* The block storage, or NULL if not available.
*/
public
function
__construct
(
ConfigFactoryInterface
$config_factory
,
ConfigurableLanguageManagerInterface
$language_manager
,
LanguageNegotiatorInterface
$negotiator
,
BlockManagerInterface
$block_manager
,
ThemeHandlerInterface
$theme_handler
,
EntityStorageInterface
$block_storage
=
NULL
)
{
$this
->
languageTypes
=
$config_factory
->
get
(
'language.types'
);
parent
::
__construct
(
$config_factory
);
$this
->
languageTypes
=
$this
->
config
(
'language.types'
);
$this
->
languageManager
=
$language_manager
;
$this
->
negotiator
=
$negotiator
;
$this
->
blockManager
=
$block_manager
;
...
...
core/modules/system/src/Form/ThemeAdminForm.php
View file @
26dfabc3
...
...
@@ -6,13 +6,13 @@
namespace
Drupal\system\Form
;
use
Drupal\Core\Form\FormBase
;
use
Drupal\Core\Form\
Config
FormBase
;
use
Drupal\Core\Form\FormStateInterface
;
/**
* Form to select the administration theme.
*/
class
ThemeAdminForm
extends
FormBase
{
class
ThemeAdminForm
extends
Config
FormBase
{
/**
* {@inheritdoc}
...
...
@@ -50,7 +50,7 @@ public function buildForm(array $form, FormStateInterface $form_state, array $th
* {@inheritdoc}
*/
public
function
submitForm
(
array
&
$form
,
FormStateInterface
$form_state
)
{
drupal_set_message
(
$this
->
t
(
'The configuration options have been saved.'
)
);
parent
::
submitForm
(
$form
,
$form_state
);
$this
->
config
(
'system.theme'
)
->
set
(
'admin'
,
$form_state
->
getValue
(
'admin_theme'
))
->
save
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment