Drupal 8  8.0.2
LanguageListBuilder Class Reference
Inheritance diagram for LanguageListBuilder:

Public Member Functions

 __construct (EntityTypeInterface $entity_type, EntityStorageInterface $storage, LanguageManagerInterface $language_manager, ConfigFactoryInterface $config_factory)
 
 load ()
 
 getFormId ()
 
 buildHeader ()
 
 buildRow (EntityInterface $entity)
 
 buildForm (array $form, FormStateInterface $form_state)
 
 validateForm (array &$form, FormStateInterface $form_state)
 
 submitForm (array &$form, FormStateInterface $form_state)
 
- Public Member Functions inherited from DraggableListBuilder
 __construct (EntityTypeInterface $entity_type, EntityStorageInterface $storage)
 
 buildHeader ()
 
 buildRow (EntityInterface $entity)
 
 render ()
 
 buildForm (array $form, FormStateInterface $form_state)
 
 validateForm (array &$form, FormStateInterface $form_state)
 
 submitForm (array &$form, FormStateInterface $form_state)
 
- Public Member Functions inherited from ConfigEntityListBuilder
 load ()
 
- Public Member Functions inherited from EntityListBuilder
 __construct (EntityTypeInterface $entity_type, EntityStorageInterface $storage)
 
 getStorage ()
 
 load ()
 
 getOperations (EntityInterface $entity)
 
 buildHeader ()
 
 buildRow (EntityInterface $entity)
 
 buildOperations (EntityInterface $entity)
 
 render ()
 
- Public Member Functions inherited from EntityHandlerBase
 setModuleHandler (ModuleHandlerInterface $module_handler)
 

Static Public Member Functions

static createInstance (ContainerInterface $container, EntityTypeInterface $entity_type)
 
- Static Public Member Functions inherited from EntityListBuilder
static createInstance (ContainerInterface $container, EntityTypeInterface $entity_type)
 

Protected Attributes

 $entitiesKey = 'languages'
 
 $languageManager
 
 $configFactory
 
- Protected Attributes inherited from DraggableListBuilder
 $entitiesKey = 'entities'
 
 $entities = array()
 
 $weightKey = FALSE
 
 $formBuilder
 
- Protected Attributes inherited from EntityListBuilder
 $storage
 
 $entityTypeId
 
 $entityType
 
 $limit = 50
 
- Protected Attributes inherited from EntityHandlerBase
 $moduleHandler
 

Additional Inherited Members

- Protected Member Functions inherited from DraggableListBuilder
 formBuilder ()
 
- Protected Member Functions inherited from EntityListBuilder
 getEntityIds ()
 
 getLabel (EntityInterface $entity)
 
 getDefaultOperations (EntityInterface $entity)
 
 getTitle ()
 
- Protected Member Functions inherited from EntityHandlerBase
 moduleHandler ()
 

Detailed Description

Defines a class to build a listing of language entities.

See Also

Constructor & Destructor Documentation

__construct ( EntityTypeInterface  $entity_type,
EntityStorageInterface  $storage,
LanguageManagerInterface  $language_manager,
ConfigFactoryInterface  $config_factory 
)

Constructs a new LanguageListBuilder object.

Parameters
\Drupal\Core\Entity\EntityTypeInterface$entity_typeThe entity type definition.
\Drupal\Core\Entity\EntityStorageInterface$storageThe entity storage controller class.
\Drupal\Core\Language\LanguageManagerInterfaceThe language manager.
\Drupal\Core\Config\ConfigFactoryInterface$config_factoryThe factory for configuration objects.

References Drupal\configFactory(), and Drupal\languageManager().

Here is the call graph for this function:

Member Function Documentation

buildForm ( array  $form,
FormStateInterface  $form_state 
)

{Form constructor.

Parameters
array$formAn associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface$form_stateThe current state of the form.
Returns
array The form structure.
}

Implements FormInterface.

References LanguageListBuilder\$entitiesKey, and t().

Here is the call graph for this function:

buildHeader ( )

{}

References t().

Here is the call graph for this function:

buildRow ( EntityInterface  $entity)

{}

References EntityInterface\id(), EntityInterface\label(), Drupal\languageManager(), and t().

Here is the call graph for this function:

static createInstance ( ContainerInterface  $container,
EntityTypeInterface  $entity_type 
)
static

{Instantiates a new instance of this entity handler.This is a factory method that returns a new instance of this object. The factory should pass any needed dependencies into the constructor of this object, but not the container itself. Every call to this method must return a new instance of this object; that is, it may not implement a singleton.

Parameters
\Symfony\Component\DependencyInjection\ContainerInterface$containerThe service container this object should use.
\Drupal\Core\Entity\EntityTypeInterface$entity_typeThe entity type definition.
Returns
static A new instance of the entity handler.
}

Implements EntityHandlerInterface.

References EntityTypeInterface\get(), and EntityTypeInterface\id().

Here is the call graph for this function:

getFormId ( )

{Returns a unique string identifying the form.

Returns
string The unique string identifying the form.
}

Implements FormInterface.

load ( )

{Loads entities of this type from storage for listing.This allows the implementation to manipulate the listing, like filtering or sorting the loaded entities.

Returns
[] An array of entities implementing .
}

Implements EntityListBuilderInterface.

submitForm ( array &  $form,
FormStateInterface  $form_state 
)

{Form submission handler.

Parameters
array$formAn associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface$form_stateThe current state of the form.
}

Implements FormInterface.

References Drupal\configFactory(), FormStateInterface\getValue(), Drupal\languageManager(), FormStateInterface\setRedirectUrl(), and t().

Here is the call graph for this function:

validateForm ( array &  $form,
FormStateInterface  $form_state 
)

{Form validation handler.

Parameters
array$formAn associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface$form_stateThe current state of the form.
}

Implements FormInterface.

References FormStateInterface\getValue(), FormStateInterface\setErrorByName(), and t().

Here is the call graph for this function:

Field Documentation

$entitiesKey = 'languages'
protected

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