Drupal 8  8.0.2
EntityTestController Class Reference
Inheritance diagram for EntityTestController:

Public Member Functions

 __construct (QueryFactory $entity_query_factory)
 
 testAdd ($entity_type_id)
 
 testAdmin ()
 
 listReferencingEntities ($entity_reference_field_name, $referenced_entity_type, $referenced_entity_id)
 
 listEntitiesAlphabetically ($entity_type_id)
 
 listEntitiesEmpty ($entity_type_id)
 

Static Public Member Functions

static create (ContainerInterface $container)
 

Protected Attributes

 $entityQueryFactory
 

Detailed Description

Controller routines for entity_test routes.

Constructor & Destructor Documentation

__construct ( QueryFactory  $entity_query_factory)

Constructs a new EntityTestController.

Parameters
\Drupal\Core\Entity\Query\QueryFactoryThe entity query factory.

Member Function Documentation

static create ( ContainerInterface  $container)
static

{}

listEntitiesAlphabetically (   $entity_type_id)

List entities of the given entity type labels, sorted alphabetically.

Parameters
string$entity_type_idThe type of the entity being listed.
Returns
array A renderable array.

References Drupal\entityManager(), and Cache\mergeTags().

Here is the call graph for this function:

listEntitiesEmpty (   $entity_type_id)

Empty list of entities of the given entity type.

Empty because no entities match the query. That may seem contrived, but it is an excellent way for testing whether an entity's list cache tags are working as expected.

Parameters
string$entity_type_idThe type of the entity being listed.
Returns
array A renderable array.

References Drupal\entityManager().

Here is the call graph for this function:

listReferencingEntities (   $entity_reference_field_name,
  $referenced_entity_type,
  $referenced_entity_id 
)

List entity_test entities referencing the given entity.

Parameters
string$entity_reference_field_nameThe name of the entity_reference field to use in the query.
string$referenced_entity_typeThe type of the entity being referenced.
int$referenced_entity_idThe ID of the entity being referenced.
Returns
array A renderable array.

References Drupal\entityManager().

Here is the call graph for this function:

testAdd (   $entity_type_id)

Displays the 'Add new entity_test' form.

Parameters
string$entity_type_idName of the entity type for which a create form should be displayed.
Returns
array The processed form for a new entity_test.
See Also
::routes()

References t().

Here is the call graph for this function:

testAdmin ( )

Returns an empty page.

See Also
::routes()

The documentation for this class was generated from the following file: