Commit 83229e05 authored by Jennifer Hodgdon's avatar Jennifer Hodgdon
Browse files

Issue #2290259 by g3r4, er.pushpinderrana, joshi.rohit100, amitgoyal: Make...

Issue #2290259 by g3r4, er.pushpinderrana, joshi.rohit100, amitgoyal: Make developer docs for entity reference selection plugins more discoverable
parent 6357f914
Loading
Loading
Loading
Loading
+12 −1
Changes for core/modules/entity_reference/src/Annotation/EntityReferenceSelection.php: 12 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -10,7 +10,18 @@
use Drupal\Component\Annotation\Plugin;

/**
 * Defines a EntityReferenceSelection annotation object.
 * Defines an EntityReferenceSelection plugin annotation object.
 *
 * Plugin Namespace: Plugin\entity_reference\selection
 *
 * For a working example, see
 * \Drupal\comment\Plugin\entity_reference\selection\CommentSelection
 *
 * @see \Drupal\entity_reference\Plugin\Type\SelectionPluginManager
 * @see \Drupal\entity_reference\Plugin\Type\Selection\SelectionInterface
 * @see \Drupal\entity_reference\Plugin\entity_reference\selection\SelectionBase
 * @see \Drupal\entity_reference\Plugin\Derivative\SelectionBase
 * @see plugin_api
 *
 * @Annotation
 */
+7 −1
Changes for core/modules/entity_reference/src/Plugin/Derivative/SelectionBase.php: 7 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -10,7 +10,13 @@
use Drupal\Component\Plugin\Derivative\DeriverBase;

/**
 * Base class for selection plugins provided by Entity Reference.
 * Provides derivative plugins for Entity Reference Selection plugins.
 *
 * @see \Drupal\entity_reference\Plugin\entity_reference\selection\SelectionBase
 * @see \Drupal\entity_reference\Plugin\Type\SelectionPluginManager
 * @see \Drupal\entity_reference\Annotation\EntityReferenceSelection
 * @see \Drupal\entity_reference\Plugin\Type\Selection\SelectionInterface
 * @see plugin_api
 */
class SelectionBase extends DeriverBase {
  /**
+6 −5
Changes for core/modules/entity_reference/src/Plugin/Type/Selection/SelectionInterface.php: 6 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -11,12 +11,13 @@
use Drupal\Core\Field\FieldDefinitionInterface;

/**
 * Interface definition for Entity Reference selection plugins.
 * Interface definition for Entity Reference Selection plugins.
 *
 * This interface details the methods that most plugin implementations will want
 * to override. See \Drupal\field\Plugin\Type\Selection\SelectionBaseInterface
 * for base wrapping methods that should most likely be inherited directly from
 * Drupal\entity_reference\Plugin\Type\Selection\SelectionBase.
 * @see \Drupal\entity_reference\Plugin\entity_reference\selection\SelectionBase
 * @see \Drupal\entity_reference\Plugin\Type\SelectionPluginManager
 * @see \Drupal\entity_reference\Annotation\EntityReferenceSelection
 * @see \Drupal\entity_reference\Plugin\Derivative\SelectionBase
 * @see plugin_api
 */
interface SelectionInterface {

+7 −1
Changes for core/modules/entity_reference/src/Plugin/Type/SelectionPluginManager.php: 7 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -18,7 +18,13 @@
use Drupal\entity_reference\Plugin\Type\Selection\SelectionBroken;

/**
 * Plugin type manager for the Entity Reference Selection plugin.
 * Plugin type manager for Entity Reference Selection plugins.
 *
 * @see \Drupal\entity_reference\Annotation\EntityReferenceSelection
 * @see \Drupal\entity_reference\Plugin\Type\Selection\SelectionInterface
 * @see \Drupal\entity_reference\Plugin\entity_reference\selection\SelectionBase
 * @see \Drupal\entity_reference\Plugin\Derivative\SelectionBase
 * @see plugin_api
 */
class SelectionPluginManager extends DefaultPluginManager {

+10 −1
Changes for core/modules/entity_reference/src/Plugin/entity_reference/selection/SelectionBase.php: 10 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -15,7 +15,16 @@
use Drupal\entity_reference\Plugin\Type\Selection\SelectionInterface;

/**
 * Plugin implementation of the 'selection' entity_reference.
 * Default plugin implementation of the Entity Reference Selection plugin.
 *
 * Also serves as a base class for specific types of Entity Reference
 * Selection plugins.
 *
 * @see \Drupal\entity_reference\Plugin\Type\SelectionPluginManager
 * @see \Drupal\entity_reference\Annotation\EntityReferenceSelection
 * @see \Drupal\entity_reference\Plugin\Type\Selection\SelectionInterface
 * @see \Drupal\entity_reference\Plugin\Derivative\SelectionBase
 * @see plugin_api
 *
 * @EntityReferenceSelection(
 *   id = "default",