Drupal 8  8.0.2
SystemTestController Class Reference
Inheritance diagram for SystemTestController:

Public Member Functions

 __construct (LockBackendInterface $lock, LockBackendInterface $persistent_lock, AccountInterface $current_user, RendererInterface $renderer)
 
 mainContentFallback ()
 
 drupalSetMessageTest ()
 
 getDestination (Request $request)
 
 requestDestination (Request $request)
 
 lockAcquire ()
 
 lockExit ()
 
 lockPersist ($lock_name)
 
 system_test_cache_tags_page ()
 
 system_test_cache_maxage_page ()
 
 authorizeInit ($page_title)
 
 setHeader (Request $request)
 
 respondWithReponse (Request $request)
 
 respondWithPublicResponse ()
 
 respondWithCacheableReponse (Request $request)
 
 shutdownFunctions ($arg1, $arg2)
 
 configureTitle ($foo)
 
 permissionDependentContent ()
 

Static Public Member Functions

static create (ContainerInterface $container)
 
static preRenderCacheTags ($elements)
 

Protected Attributes

 $lock
 
 $persistentLock
 
 $currentUser
 
 $renderer
 

Detailed Description

Controller routines for system_test routes.

Constructor & Destructor Documentation

__construct ( LockBackendInterface  $lock,
LockBackendInterface  $persistent_lock,
AccountInterface  $current_user,
RendererInterface  $renderer 
)

Constructs the SystemTestController.

Parameters
\Drupal\Core\Lock\LockBackendInterface$lockThe lock service.
\Drupal\Core\Lock\LockBackendInterface$persistent_lockThe persistent lock service.
\Drupal\Core\Session\AccountInterface$current_userThe current user.
\Drupal\Core\Render\RendererInterface$rendererThe renderer.

References Drupal\currentUser(), and Drupal\lock().

Here is the call graph for this function:

Member Function Documentation

authorizeInit (   $page_title)

Initialize authorize.php during testing.

See Also
system_authorized_init().

References Url\fromUri().

Here is the call graph for this function:

configureTitle (   $foo)

Returns the title for system_test.info.yml's configure route.

Parameters
string$fooAny string for the {foo} slug.
Returns
string
static create ( ContainerInterface  $container)
static

{}

drupalSetMessageTest ( )

Tests setting messages and removing one before it is displayed.

Returns
string Empty string, we just test the setting of messages.

References t().

Here is the call graph for this function:

getDestination ( Request  $request)

Controller to return $_GET['destination'] for testing.

Parameters
\Symfony\Component\HttpFoundation\Request$requestThe request.
Returns
The response.
lockAcquire ( )

Try to acquire a named lock and report the outcome.

References Drupal\lock().

Here is the call graph for this function:

lockExit ( )

Try to acquire a specific lock, and then exit.

References Drupal\lock().

Here is the call graph for this function:

lockPersist (   $lock_name)

Creates a lock that will persist across requests.

Parameters
string$lock_nameThe name of the persistent lock to acquire.
Returns
string The text to display.
mainContentFallback ( )

Tests main content fallback.

Returns
string The text to display.

References t().

Here is the call graph for this function:

permissionDependentContent ( )

Shows permission-dependent content.

Returns
array A render array.

References AccessResult\allowedIfHasPermission(), and Drupal\currentUser().

Here is the call graph for this function:

static preRenderCacheTags (   $elements)
static

Sets a cache tag on an element to help test #pre_render and cache tags.

requestDestination ( Request  $request)

Controller to return $_REQUEST['destination'] for testing.

Parameters
\Symfony\Component\HttpFoundation\Request$requestThe request.
Returns
The response.
respondWithCacheableReponse ( Request  $request)

A simple page callback that uses a CacheableResponse object.

respondWithPublicResponse ( )

A plain Symfony reponse with Cache-Control: public, max-age=60.

respondWithReponse ( Request  $request)

A simple page callback that uses a plain Symfony response object.

setHeader ( Request  $request)

Sets a header.

References t().

Here is the call graph for this function:

shutdownFunctions (   $arg1,
  $arg2 
)

A simple page callback which adds a register shutdown function.

References drupal_register_shutdown_function().

Here is the call graph for this function:

system_test_cache_maxage_page ( )

Set cache max-age on the returned render array.

system_test_cache_tags_page ( )

Set cache tag on on the returned render array.


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