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
220
Merge Requests
220
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
838d7e70
Commit
838d7e70
authored
Feb 08, 2013
by
webchick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#1911814
by damiankloip: Add a setStatus() method for configuration entities.
parent
4bbff164
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
3 deletions
+20
-3
core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php
core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php
+9
-3
core/lib/Drupal/Core/Config/Entity/ConfigEntityInterface.php
core/lib/Drupal/Core/Config/Entity/ConfigEntityInterface.php
+11
-0
No files found.
core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php
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
;
}
...
...
core/lib/Drupal/Core/Config/Entity/ConfigEntityInterface.php
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.
*
...
...
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