Skip to content
Snippets Groups Projects
Commit dad465fc authored by catch's avatar catch
Browse files

Issue #2658628 by tim.plunkett:...

Issue #2658628 by tim.plunkett: \Drupal\Core\Entity\EntityWithPluginCollectionInterface has no reason to be entity specific
parent 80821af6
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
namespace Drupal\Core\Entity; namespace Drupal\Core\Entity;
use Drupal\Core\Plugin\ObjectWithPluginCollectionInterface;
/** /**
* Provides an interface for an object using a plugin collection. * Provides an interface for an object using a plugin collection.
* *
...@@ -14,15 +16,6 @@ ...@@ -14,15 +16,6 @@
* *
* @ingroup plugin_api * @ingroup plugin_api
*/ */
interface EntityWithPluginCollectionInterface extends EntityInterface { interface EntityWithPluginCollectionInterface extends EntityInterface, ObjectWithPluginCollectionInterface {
/**
* Gets the plugin collections used by this entity.
*
* @return \Drupal\Component\Plugin\LazyPluginCollection[]
* An array of plugin collections, keyed by the property name they use to
* store their configuration.
*/
public function getPluginCollections();
} }
<?php
/**
* @file
* Contains \Drupal\Core\Plugin\ObjectWithPluginCollectionInterface.
*/
namespace Drupal\Core\Plugin;
/**
* Provides an interface for an object using a plugin collection.
*
* @see \Drupal\Component\Plugin\LazyPluginCollection
*
* @ingroup plugin_api
*
* Entities that need this interface should implement
* \Drupal\Core\Entity\EntityWithPluginCollectionInterface, which extends this.
*/
interface ObjectWithPluginCollectionInterface {
/**
* Gets the plugin collections used by this entity.
*
* @return \Drupal\Component\Plugin\LazyPluginCollection[]
* An array of plugin collections, keyed by the property name they use to
* store their configuration.
*/
public function getPluginCollections();
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment