Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
838d7e70
Commit
838d7e70
authored
12 years ago
by
Angie Byron
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#1911814
by damiankloip: Add a setStatus() method for configuration entities.
parent
4bbff164
No related branches found
No related tags found
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php
+9
-3
9 additions, 3 deletions
core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php
core/lib/Drupal/Core/Config/Entity/ConfigEntityInterface.php
+11
-0
11 additions, 0 deletions
core/lib/Drupal/Core/Config/Entity/ConfigEntityInterface.php
with
20 additions
and
3 deletions
core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php
+
9
−
3
View file @
838d7e70
...
...
@@ -99,15 +99,21 @@ public function set($property_name, $value, $langcode = NULL) {
* Implements \Drupal\Core\Config\Entity\ConfigEntityInterface::enable().
*/
public
function
enable
()
{
$this
->
status
=
TRUE
;
return
$this
;
return
$this
->
setStatus
(
TRUE
);
}
/**
* Implements \Drupal\Core\Config\Entity\ConfigEntityInterface::disable().
*/
public
function
disable
()
{
$this
->
status
=
FALSE
;
return
$this
->
setStatus
(
FALSE
);
}
/**
* Implements \Drupal\Core\Config\Entity\ConfigEntityInterface::setStatus().
*/
public
function
setStatus
(
bool
$status
)
{
$this
->
status
=
$status
;
return
$this
;
}
...
...
This diff is collapsed.
Click to expand it.
core/lib/Drupal/Core/Config/Entity/ConfigEntityInterface.php
+
11
−
0
View file @
838d7e70
...
...
@@ -48,6 +48,17 @@ public function enable();
*/
public
function
disable
();
/**
* Sets the status of the configuration entity.
*
* @param bool $status
* The status of the configuration entity.
*
* @return \Drupal\Core\Config\Entity\ConfigEntityInterface
* The class instance that this method is called on.
*/
public
function
setStatus
(
bool
$status
);
/**
* Returns whether the configuration entity is enabled.
*
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment