Drupal 8  8.0.2
ThemeController Class Reference
Inheritance diagram for ThemeController:

Public Member Functions

 __construct (ThemeHandlerInterface $theme_handler, ConfigFactoryInterface $config_factory)
 
 uninstall (Request $request)
 
 install (Request $request)
 
 setDefaultTheme (Request $request)
 

Static Public Member Functions

static create (ContainerInterface $container)
 

Protected Attributes

 $themeHandler
 

Detailed Description

Controller for theme handling.

Constructor & Destructor Documentation

__construct ( ThemeHandlerInterface  $theme_handler,
ConfigFactoryInterface  $config_factory 
)

Constructs a new ThemeController.

Parameters
\Drupal\Core\Extension\ThemeHandlerInterface$theme_handlerThe theme handler.
\Drupal\Core\Config\ConfigFactoryInterface$config_factoryThe config factory.

References Drupal\configFactory().

Here is the call graph for this function:

Member Function Documentation

static create ( ContainerInterface  $container)
static

{}

install ( Request  $request)

Installs a theme.

Parameters
\Symfony\Component\HttpFoundation\Request$requestA request object containing a theme name and a valid token.
Returns
Redirects back to the appearance admin page.
Exceptions
\Symfony\Component\HttpKernel\Exception\AccessDeniedHttpExceptionThrows access denied when no theme or token is set in the request or when the token is invalid.

References t().

Here is the call graph for this function:

setDefaultTheme ( Request  $request)

Set the default theme.

Parameters
\Symfony\Component\HttpFoundation\Request$requestA request object containing a theme name.
Returns
Redirects back to the appearance admin page.
Exceptions
\Symfony\Component\HttpKernel\Exception\AccessDeniedHttpExceptionThrows access denied when no theme is set in the request.

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

Here is the call graph for this function:

uninstall ( Request  $request)

Uninstalls a theme.

Parameters
\Symfony\Component\HttpFoundation\Request$requestA request object containing a theme name and a valid token.
Returns
Redirects back to the appearance admin page.
Exceptions
\Symfony\Component\HttpKernel\Exception\AccessDeniedHttpExceptionThrows access denied when no theme or token is set in the request or when the token is invalid.

References Drupal\config(), and t().

Here is the call graph for this function:


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