Commit 71711656 authored by alexpott's avatar alexpott

Issue #2471653 by bojanz, Kazanir: Standardize getter docblocks in Drupal\Core\Entity

parent ec9c4b06
...@@ -981,7 +981,7 @@ public function referencedEntities() { ...@@ -981,7 +981,7 @@ public function referencedEntities() {
} }
/** /**
* Returns the value of the given entity key, if defined. * Gets the value of the given entity key, if defined.
* *
* @param string $key * @param string $key
* Name of the entity key, for example id, revision or bundle. * Name of the entity key, for example id, revision or bundle.
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
interface ContentEntityFormInterface extends EntityFormInterface { interface ContentEntityFormInterface extends EntityFormInterface {
/** /**
* Returns the form display. * Gets the form display.
* *
* @param \Drupal\Core\Form\FormStateInterface $form_state * @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the form. * The current state of the form.
...@@ -40,7 +40,7 @@ public function getFormDisplay(FormStateInterface $form_state); ...@@ -40,7 +40,7 @@ public function getFormDisplay(FormStateInterface $form_state);
public function setFormDisplay(EntityFormDisplayInterface $form_display, FormStateInterface $form_state); public function setFormDisplay(EntityFormDisplayInterface $form_display, FormStateInterface $form_state);
/** /**
* Returns the code identifying the active form language. * Gets the code identifying the active form language.
* *
* @param \Drupal\Core\Form\FormStateInterface $form_state * @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the form. * The current state of the form.
......
...@@ -72,7 +72,7 @@ public function setComponent($name, array $options = array()); ...@@ -72,7 +72,7 @@ public function setComponent($name, array $options = array());
public function removeComponent($name); public function removeComponent($name);
/** /**
* Returns the highest weight of the components in the display. * Gets the highest weight of the components in the display.
* *
* @return int|null * @return int|null
* The highest weight of the components in the display, or NULL if the * The highest weight of the components in the display, or NULL if the
...@@ -81,7 +81,7 @@ public function removeComponent($name); ...@@ -81,7 +81,7 @@ public function removeComponent($name);
public function getHighestWeight(); public function getHighestWeight();
/** /**
* Returns the renderer plugin for a field (e.g. widget, formatter). * Gets the renderer plugin for a field (e.g. widget, formatter).
* *
* @param string $field_name * @param string $field_name
* The field name. * The field name.
...@@ -92,7 +92,7 @@ public function getHighestWeight(); ...@@ -92,7 +92,7 @@ public function getHighestWeight();
public function getRenderer($field_name); public function getRenderer($field_name);
/** /**
* Returns the entity type for which this display is used. * Gets the entity type for which this display is used.
* *
* @return string * @return string
* The entity type id. * The entity type id.
...@@ -100,7 +100,7 @@ public function getRenderer($field_name); ...@@ -100,7 +100,7 @@ public function getRenderer($field_name);
public function getTargetEntityTypeId(); public function getTargetEntityTypeId();
/** /**
* Returns the view or form mode to be displayed. * Gets the view or form mode to be displayed.
* *
* @return string * @return string
* The mode to be displayed. * The mode to be displayed.
...@@ -108,7 +108,7 @@ public function getTargetEntityTypeId(); ...@@ -108,7 +108,7 @@ public function getTargetEntityTypeId();
public function getMode(); public function getMode();
/** /**
* Returns the original view or form mode that was requested. * Gets the original view or form mode that was requested.
* *
* @return string * @return string
* The original mode that was requested. * The original mode that was requested.
...@@ -116,7 +116,7 @@ public function getMode(); ...@@ -116,7 +116,7 @@ public function getMode();
public function getOriginalMode(); public function getOriginalMode();
/** /**
* Returns the bundle to be displayed. * Gets the bundle to be displayed.
* *
* @return string * @return string
* The bundle to be displayed. * The bundle to be displayed.
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
interface EntityViewDisplayInterface extends EntityDisplayInterface { interface EntityViewDisplayInterface extends EntityDisplayInterface {
/** /**
* Returns a renderable array for the components of an entity. * Builds a renderable array for the components of an entity.
* *
* See the buildMultiple() method for details. * See the buildMultiple() method for details.
* *
...@@ -30,7 +30,7 @@ interface EntityViewDisplayInterface extends EntityDisplayInterface { ...@@ -30,7 +30,7 @@ interface EntityViewDisplayInterface extends EntityDisplayInterface {
public function build(FieldableEntityInterface $entity); public function build(FieldableEntityInterface $entity);
/** /**
* Returns a renderable array for the components of a set of entities. * Builds a renderable array for the components of a set of entities.
* *
* This only includes the components handled by the Display object, but * This only includes the components handled by the Display object, but
* excludes 'extra fields', that are typically rendered through specific, * excludes 'extra fields', that are typically rendered through specific,
......
...@@ -67,7 +67,7 @@ public function __construct(array $values, $entity_type) { ...@@ -67,7 +67,7 @@ public function __construct(array $values, $entity_type) {
} }
/** /**
* Returns the entity manager. * Gets the entity manager.
* *
* @return \Drupal\Core\Entity\EntityManagerInterface * @return \Drupal\Core\Entity\EntityManagerInterface
*/ */
...@@ -76,7 +76,7 @@ protected function entityManager() { ...@@ -76,7 +76,7 @@ protected function entityManager() {
} }
/** /**
* Returns the language manager. * Gets the language manager.
* *
* @return \Drupal\Core\Language\LanguageManagerInterface * @return \Drupal\Core\Language\LanguageManagerInterface
*/ */
...@@ -85,7 +85,7 @@ protected function languageManager() { ...@@ -85,7 +85,7 @@ protected function languageManager() {
} }
/** /**
* Returns the UUID generator. * Gets the UUID generator.
* *
* @return \Drupal\Component\Uuid\UuidInterface * @return \Drupal\Component\Uuid\UuidInterface
*/ */
...@@ -235,7 +235,7 @@ public function hasLinkTemplate($rel) { ...@@ -235,7 +235,7 @@ public function hasLinkTemplate($rel) {
} }
/** /**
* Returns an array link templates. * Gets an array link templates.
* *
* @return array * @return array
* An array of link templates containing paths. * An array of link templates containing paths.
...@@ -274,7 +274,7 @@ public function url($rel = 'canonical', $options = array()) { ...@@ -274,7 +274,7 @@ public function url($rel = 'canonical', $options = array()) {
} }
/** /**
* Returns an array of placeholders for this entity. * Gets an array of placeholders for this entity.
* *
* Individual entity classes may override this method to add additional * Individual entity classes may override this method to add additional
* placeholders if desired. If so, they should be sure to replicate the * placeholders if desired. If so, they should be sure to replicate the
......
...@@ -34,7 +34,7 @@ public function __construct(SelectionPluginManagerInterface $selection_manager) ...@@ -34,7 +34,7 @@ public function __construct(SelectionPluginManagerInterface $selection_manager)
} }
/** /**
* Returns matched labels based on a given search string. * Gets matched labels based on a given search string.
* *
* @param string $target_type * @param string $target_type
* The ID of the target entity type. * The ID of the target entity type.
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
interface EntityChangedInterface { interface EntityChangedInterface {
/** /**
* Returns the timestamp of the last entity change. * Gets the timestamp of the last entity change.
* *
* @return int * @return int
* The timestamp of the last entity save operation. * The timestamp of the last entity save operation.
......
...@@ -146,7 +146,7 @@ public function applyUpdates() { ...@@ -146,7 +146,7 @@ public function applyUpdates() {
} }
/** /**
* Returns a list of changes to entity type and field storage definitions. * Gets a list of changes to entity type and field storage definitions.
* *
* @return array * @return array
* An associative array keyed by entity type id of change descriptors. Every * An associative array keyed by entity type id of change descriptors. Every
......
...@@ -64,7 +64,7 @@ interface EntityDefinitionUpdateManagerInterface { ...@@ -64,7 +64,7 @@ interface EntityDefinitionUpdateManagerInterface {
public function needsUpdates(); public function needsUpdates();
/** /**
* Returns a human readable summary of the detected changes. * Gets a human readable summary of the detected changes.
* *
* @return array * @return array
* An associative array keyed by entity type id. Each entry is an array of * An associative array keyed by entity type id. Each entry is an array of
......
...@@ -22,7 +22,7 @@ trait EntityDeleteFormTrait { ...@@ -22,7 +22,7 @@ trait EntityDeleteFormTrait {
use ConfigDependencyDeleteFormTrait; use ConfigDependencyDeleteFormTrait;
/** /**
* Returns the entity of this form. * Gets the entity of this form.
* *
* Provided by \Drupal\Core\Entity\EntityForm. * Provided by \Drupal\Core\Entity\EntityForm.
* *
...@@ -62,7 +62,7 @@ public function getConfirmText() { ...@@ -62,7 +62,7 @@ public function getConfirmText() {
} }
/** /**
* Returns the message to display to the user after deleting the entity. * Gets the message to display to the user after deleting the entity.
* *
* @return string * @return string
* The translated string of the deletion message. * The translated string of the deletion message.
......
...@@ -388,7 +388,7 @@ public function getHighestWeight() { ...@@ -388,7 +388,7 @@ public function getHighestWeight() {
} }
/** /**
* Returns the field definition of a field. * Gets the field definition of a field.
*/ */
protected function getFieldDefinition($field_name) { protected function getFieldDefinition($field_name) {
$definitions = $this->getFieldDefinitions(); $definitions = $this->getFieldDefinitions();
...@@ -396,7 +396,7 @@ protected function getFieldDefinition($field_name) { ...@@ -396,7 +396,7 @@ protected function getFieldDefinition($field_name) {
} }
/** /**
* Returns the definitions of the fields that are candidate for display. * Gets the definitions of the fields that are candidate for display.
*/ */
protected function getFieldDefinitions() { protected function getFieldDefinitions() {
if (!isset($this->fieldDefinitions)) { if (!isset($this->fieldDefinitions)) {
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
interface EntityDisplayModeInterface extends ConfigEntityInterface { interface EntityDisplayModeInterface extends ConfigEntityInterface {
/** /**
* Returns the entity type this display mode is used for. * Gets the entity type this display mode is used for.
* *
* @return string * @return string
* The entity type name. * The entity type name.
......
...@@ -129,7 +129,7 @@ protected function init(FormStateInterface $form_state) { ...@@ -129,7 +129,7 @@ protected function init(FormStateInterface $form_state) {
} }
/** /**
* Returns the actual form array to be built. * Gets the actual form array to be built.
* *
* @see \Drupal\Core\Entity\EntityForm::processForm() * @see \Drupal\Core\Entity\EntityForm::processForm()
* @see \Drupal\Core\Entity\EntityForm::afterBuild() * @see \Drupal\Core\Entity\EntityForm::afterBuild()
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
interface EntityFormBuilderInterface { interface EntityFormBuilderInterface {
/** /**
* Returns the built and processed entity form for the given entity. * Gets the built and processed entity form for the given entity.
* *
* @param \Drupal\Core\Entity\EntityInterface $entity * @param \Drupal\Core\Entity\EntityInterface $entity
* The entity to be created or edited. * The entity to be created or edited.
......
...@@ -29,7 +29,7 @@ interface EntityFormInterface extends BaseFormIdInterface { ...@@ -29,7 +29,7 @@ interface EntityFormInterface extends BaseFormIdInterface {
public function setOperation($operation); public function setOperation($operation);
/** /**
* Returns the operation identifying the form. * Gets the operation identifying the form.
* *
* @return string * @return string
* The name of the operation. * The name of the operation.
...@@ -37,7 +37,7 @@ public function setOperation($operation); ...@@ -37,7 +37,7 @@ public function setOperation($operation);
public function getOperation(); public function getOperation();
/** /**
* Returns the form entity. * Gets the form entity.
* *
* The form entity which has been used for populating form element defaults. * The form entity which has been used for populating form element defaults.
* *
......
...@@ -28,7 +28,7 @@ abstract class EntityHandlerBase { ...@@ -28,7 +28,7 @@ abstract class EntityHandlerBase {
protected $moduleHandler; protected $moduleHandler;
/** /**
* Returns the module handler. * Gets the module handler.
* *
* @return \Drupal\Core\Extension\ModuleHandlerInterface * @return \Drupal\Core\Extension\ModuleHandlerInterface
* The module handler. * The module handler.
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
interface EntityInterface extends AccessibleInterface, CacheableDependencyInterface { interface EntityInterface extends AccessibleInterface, CacheableDependencyInterface {
/** /**
* Returns the entity UUID (Universally Unique Identifier). * Gets the entity UUID (Universally Unique Identifier).
* *
* The UUID is guaranteed to be unique and can be used to identify an entity * The UUID is guaranteed to be unique and can be used to identify an entity
* across multiple systems. * across multiple systems.
...@@ -29,7 +29,7 @@ interface EntityInterface extends AccessibleInterface, CacheableDependencyInterf ...@@ -29,7 +29,7 @@ interface EntityInterface extends AccessibleInterface, CacheableDependencyInterf
public function uuid(); public function uuid();
/** /**
* Returns the identifier. * Gets the identifier.
* *
* @return string|int|null * @return string|int|null
* The entity identifier, or NULL if the object does not yet have an * The entity identifier, or NULL if the object does not yet have an
...@@ -38,7 +38,7 @@ public function uuid(); ...@@ -38,7 +38,7 @@ public function uuid();
public function id(); public function id();
/** /**
* Returns the language of the entity. * Gets the language of the entity.
* *
* @return \Drupal\Core\Language\LanguageInterface * @return \Drupal\Core\Language\LanguageInterface
* The language object. * The language object.
...@@ -46,7 +46,7 @@ public function id(); ...@@ -46,7 +46,7 @@ public function id();
public function language(); public function language();
/** /**
* Returns whether the entity is new. * Determines whether the entity is new.
* *
* Usually an entity is new if no ID exists for it yet. However, entities may * Usually an entity is new if no ID exists for it yet. However, entities may
* be enforced to be new with existing IDs too. * be enforced to be new with existing IDs too.
...@@ -75,7 +75,7 @@ public function isNew(); ...@@ -75,7 +75,7 @@ public function isNew();
public function enforceIsNew($value = TRUE); public function enforceIsNew($value = TRUE);
/** /**
* Returns the ID of the type of the entity. * Gets the ID of the type of the entity.
* *
* @return string * @return string
* The entity type ID. * The entity type ID.
...@@ -83,7 +83,7 @@ public function enforceIsNew($value = TRUE); ...@@ -83,7 +83,7 @@ public function enforceIsNew($value = TRUE);
public function getEntityTypeId(); public function getEntityTypeId();
/** /**
* Returns the bundle of the entity. * Gets the bundle of the entity.
* *
* @return string * @return string
* The bundle of the entity. Defaults to the entity type ID if the entity * The bundle of the entity. Defaults to the entity type ID if the entity
...@@ -92,7 +92,7 @@ public function getEntityTypeId(); ...@@ -92,7 +92,7 @@ public function getEntityTypeId();
public function bundle(); public function bundle();
/** /**
* Returns the label of the entity. * Gets the label of the entity.
* *
* @return string|null * @return string|null
* The label of the entity, or NULL if there is no label defined. * The label of the entity, or NULL if there is no label defined.
...@@ -100,7 +100,7 @@ public function bundle(); ...@@ -100,7 +100,7 @@ public function bundle();
public function label(); public function label();
/** /**
* Returns the URI elements of the entity. * Gets the URI elements of the entity.
* *
* URI templates might be set in the links array in an annotation, for * URI templates might be set in the links array in an annotation, for
* example: * example:
...@@ -131,7 +131,7 @@ public function label(); ...@@ -131,7 +131,7 @@ public function label();
public function urlInfo($rel = 'canonical', array $options = array()); public function urlInfo($rel = 'canonical', array $options = array());
/** /**
* Returns the public URL for this entity. * Gets the public URL for this entity.
* *
* @param string $rel * @param string $rel
* The link relationship type, for example: canonical or edit-form. * The link relationship type, for example: canonical or edit-form.
...@@ -162,7 +162,7 @@ public function url($rel = 'canonical', $options = array()); ...@@ -162,7 +162,7 @@ public function url($rel = 'canonical', $options = array());
public function link($text = NULL, $rel = 'canonical', array $options = []); public function link($text = NULL, $rel = 'canonical', array $options = []);
/** /**
* Returns the internal path for this entity. * Gets the internal path for this entity.
* *
* self::url() will return the full path including any prefixes, fragments, or * self::url() will return the full path including any prefixes, fragments, or
* query strings. This path does not include those. * query strings. This path does not include those.
...@@ -190,7 +190,7 @@ public function getSystemPath($rel = 'canonical'); ...@@ -190,7 +190,7 @@ public function getSystemPath($rel = 'canonical');
public function hasLinkTemplate($key); public function hasLinkTemplate($key);
/** /**
* Returns a list of URI relationships supported by this entity. * Gets a list of URI relationships supported by this entity.
* *
* @return string[] * @return string[]
* An array of link relationships supported by this entity. * An array of link relationships supported by this entity.
...@@ -341,7 +341,7 @@ public static function postLoad(EntityStorageInterface $storage, array &$entitie ...@@ -341,7 +341,7 @@ public static function postLoad(EntityStorageInterface $storage, array &$entitie
public function createDuplicate(); public function createDuplicate();
/** /**
* Returns the entity type definition. * Gets the entity type definition.
* *
* @return \Drupal\Core\Entity\EntityTypeInterface * @return \Drupal\Core\Entity\EntityTypeInterface
* The entity type definition. * The entity type definition.
...@@ -349,7 +349,7 @@ public function createDuplicate(); ...@@ -349,7 +349,7 @@ public function createDuplicate();
public function getEntityType(); public function getEntityType();
/** /**
* Returns a list of entities referenced by this entity. * Gets a list of entities referenced by this entity.
* *
* @return \Drupal\Core\Entity\EntityInterface[] * @return \Drupal\Core\Entity\EntityInterface[]
* An array of entities. * An array of entities.
...@@ -357,7 +357,7 @@ public function getEntityType(); ...@@ -357,7 +357,7 @@ public function getEntityType();
public function referencedEntities(); public function referencedEntities();
/** /**
* Returns the original ID. * Gets the original ID.
* *
* @return int|string|null * @return int|string|null
* The original ID, or NULL if no ID was set or for entity types that do not * The original ID, or NULL if no ID was set or for entity types that do not
...@@ -377,7 +377,7 @@ public function getOriginalId(); ...@@ -377,7 +377,7 @@ public function getOriginalId();
public function setOriginalId($id); public function setOriginalId($id);
/** /**