Skip to content
Snippets Groups Projects
Unverified Commit a1ed6ed5 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3203009 by quietone, Gauravmahlawat, joachim, catch: the methods in...

Issue #3203009 by quietone, Gauravmahlawat, joachim, catch: the methods in FieldableEntity should document how they are meant to be used

(cherry picked from commit 76f6b690)
parent 156c4c17
No related branches found
No related tags found
5 merge requests!10011Issue #3200534 by quietone, longwave, Kristen Pol: Use dataprovider for...,!2571Issue #3000717: Missing mapping for "nodereference_url" widget,!2521Issue #3185775: Place Views preview on the side on large monitors,!1479Issue #3250298: Return empty string "" with JSON Serializer instead of FALSE,!1478Issue #3250298: Return empty string "" with JSON Serializer instead of FALSE
......@@ -21,6 +21,12 @@ abstract class FieldableEntity extends DrupalSqlBase {
/**
* Returns all non-deleted field instances attached to a specific entity type.
*
* Typically, getFields() is used in the prepareRow method of a source plugin
* to get a list of all the field instances of the entity. A source plugin can
* then loop through the list of fields to do any other preparation before
* processing the row. Typically, a source plugin will use getFieldValues()
* to get the values of each field.
*
* @param string $entity_type
* The entity type ID.
* @param string|null $bundle
......@@ -47,6 +53,9 @@ protected function getFields($entity_type, $bundle = NULL) {
/**
* Retrieves field values for a single field of a single entity.
*
* Typically, getFieldValues() is used in the prepareRow method of a source
* plugin where the return values are placed on the row source.
*
* @param string $entity_type
* The entity type.
* @param string $field
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment