Drupal 8  8.0.2
LanguageTestController Class Reference
Inheritance diagram for LanguageTestController:

Public Member Functions

 __construct (HttpKernelInterface $httpKernel, LanguageManagerInterface $language_manager)
 
 testEntity (ConfigurableLanguageInterface $configurable_language)
 
 typeLinkActiveClass ()
 
 testSubRequest ()
 

Static Public Member Functions

static create (ContainerInterface $container)
 

Protected Attributes

 $httpKernel
 
 $languageManager
 

Detailed Description

Controller routines for language_test routes.

Constructor & Destructor Documentation

__construct ( HttpKernelInterface  $httpKernel,
LanguageManagerInterface  $language_manager 
)

Constructs a new LanguageTestController object.

Parameters
\Symfony\Component\HttpKernel\HttpKernelInterface$httpKernelAn HTTP kernel.

References Drupal\languageManager().

Here is the call graph for this function:

Member Function Documentation

static create ( ContainerInterface  $container)
static

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

Parameters
\Symfony\Component\DependencyInjection\ContainerInterface$containerThe service container this instance should use.
}

Implements ContainerInjectionInterface.

testEntity ( ConfigurableLanguageInterface  $configurable_language)

Route entity upcasting test helper.

Parameters
\Drupal\language\ConfigurableLanguageInterface$languageThe ConfigurableLanguage object from the route.
Returns
string Testing feedback based on (translated) entity title.

References EntityInterface\label(), and t().

Here is the call graph for this function:

testSubRequest ( )

Uses a sub request to retrieve the 'user' page.

Returns
The kernels response to the sub request.
typeLinkActiveClass ( )

Returns links to the current page with different langcodes.

Using #type 'link' causes these links to be rendered with the link generator.

References Url\fromRoute(), Drupal\languageManager(), and t().

Here is the call graph for this function:


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