comparison core/lib/Drupal/Core/Theme/ThemeSettings.php @ 0:4c8ae668cc8c

Initial import (non-working)
author Chris Cannam
date Wed, 29 Nov 2017 16:09:58 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:4c8ae668cc8c
1 <?php
2
3 namespace Drupal\Core\Theme;
4
5 use Drupal\Core\Config\ConfigBase;
6
7 /**
8 * Provides a configuration API wrapper for runtime merged theme settings.
9 *
10 * Theme settings use configuration for base values but the runtime theme
11 * settings are calculated based on various site settings and are therefore
12 * not persisted.
13 *
14 * @see theme_get_setting()
15 */
16 class ThemeSettings extends ConfigBase {
17
18 /**
19 * The theme of the theme settings object.
20 *
21 * @var string
22 */
23 protected $theme;
24
25 /**
26 * Constructs a theme settings object.
27 *
28 * @param string $theme
29 * The name of the theme settings object being constructed.
30 */
31 public function __construct($theme) {
32 $this->theme = $theme;
33 }
34
35 /**
36 * Returns the theme of this theme settings object.
37 *
38 * @return string
39 * The theme of this theme settings object.
40 */
41 public function getTheme() {
42 return $this->theme;
43 }
44
45 /**
46 * {@inheritdoc}
47 */
48 public function getCacheTags() {
49 return ['rendered'];
50 }
51
52 }