Commit da91e5a9 authored by alexpott's avatar alexpott
Browse files

Issue #2208015 by tim.plunkett: Remove "convert to trait" comments about...

Issue #2208015 by tim.plunkett: Remove "convert to trait" comments about EntityWithPluginBagInterface.
parent d34434d8
...@@ -36,10 +36,6 @@ abstract class ConfigEntityBase extends Entity implements ConfigEntityInterface ...@@ -36,10 +36,6 @@ abstract class ConfigEntityBase extends Entity implements ConfigEntityInterface
* This is needed when the entity utilizes a PluginBag, to dictate where the * This is needed when the entity utilizes a PluginBag, to dictate where the
* plugin configuration should be stored. * plugin configuration should be stored.
* *
* @todo Move this to a trait along with
* \Drupal\Core\Config\Entity\EntityWithPluginBagInterface, and give it a
* default value of 'configuration'.
*
* @var string * @var string
*/ */
protected $pluginConfigKey; protected $pluginConfigKey;
...@@ -139,8 +135,6 @@ public function get($property_name) { ...@@ -139,8 +135,6 @@ public function get($property_name) {
* {@inheritdoc} * {@inheritdoc}
*/ */
public function set($property_name, $value) { public function set($property_name, $value) {
// @todo When \Drupal\Core\Config\Entity\EntityWithPluginBagInterface moves
// to a trait, switch to class_uses() instead.
if ($this instanceof EntityWithPluginBagInterface) { if ($this instanceof EntityWithPluginBagInterface) {
if ($property_name == $this->pluginConfigKey) { if ($property_name == $this->pluginConfigKey) {
// If external code updates the settings, pass it along to the plugin. // If external code updates the settings, pass it along to the plugin.
...@@ -262,8 +256,6 @@ public function toArray() { ...@@ -262,8 +256,6 @@ public function toArray() {
public function preSave(EntityStorageInterface $storage) { public function preSave(EntityStorageInterface $storage) {
parent::preSave($storage); parent::preSave($storage);
// @todo When \Drupal\Core\Config\Entity\EntityWithPluginBagInterface moves
// to a trait, switch to class_uses() instead.
if ($this instanceof EntityWithPluginBagInterface) { if ($this instanceof EntityWithPluginBagInterface) {
// Any changes to the plugin configuration must be saved to the entity's // Any changes to the plugin configuration must be saved to the entity's
// copy as well. // copy as well.
......
...@@ -11,8 +11,6 @@ ...@@ -11,8 +11,6 @@
* Provides an interface for an object utilizing a plugin bag. * Provides an interface for an object utilizing a plugin bag.
* *
* @see \Drupal\Component\Plugin\PluginBag * @see \Drupal\Component\Plugin\PluginBag
*
* @todo Turn this into a trait.
*/ */
interface EntityWithPluginBagInterface extends ConfigEntityInterface { interface EntityWithPluginBagInterface extends ConfigEntityInterface {
...@@ -20,8 +18,6 @@ interface EntityWithPluginBagInterface extends ConfigEntityInterface { ...@@ -20,8 +18,6 @@ interface EntityWithPluginBagInterface extends ConfigEntityInterface {
* Returns the plugin bag used by this entity. * Returns the plugin bag used by this entity.
* *
* @return \Drupal\Component\Plugin\PluginBag * @return \Drupal\Component\Plugin\PluginBag
*
* @todo Make this protected.
*/ */
public function getPluginBag(); public function getPluginBag();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment