@@ -34,51 +34,51 @@ |
||
| 34 | 34 | */ |
| 35 | 35 | class Capabilities implements IPublicCapability { |
| 36 | 36 | |
| 37 | - /** @var ThemingDefaults */ |
|
| 38 | - protected $theming; |
|
| 37 | + /** @var ThemingDefaults */ |
|
| 38 | + protected $theming; |
|
| 39 | 39 | |
| 40 | - /** @var Util */ |
|
| 41 | - protected $util; |
|
| 40 | + /** @var Util */ |
|
| 41 | + protected $util; |
|
| 42 | 42 | |
| 43 | - /** @var IURLGenerator */ |
|
| 44 | - protected $url; |
|
| 43 | + /** @var IURLGenerator */ |
|
| 44 | + protected $url; |
|
| 45 | 45 | |
| 46 | - /** @var IConfig */ |
|
| 47 | - protected $config; |
|
| 46 | + /** @var IConfig */ |
|
| 47 | + protected $config; |
|
| 48 | 48 | |
| 49 | - /** |
|
| 50 | - * @param ThemingDefaults $theming |
|
| 51 | - * @param Util $util |
|
| 52 | - * @param IURLGenerator $url |
|
| 53 | - * @param IConfig $config |
|
| 54 | - */ |
|
| 55 | - public function __construct(ThemingDefaults $theming, Util $util, IURLGenerator $url, IConfig $config) { |
|
| 56 | - $this->theming = $theming; |
|
| 57 | - $this->util = $util; |
|
| 58 | - $this->url = $url; |
|
| 59 | - $this->config = $config; |
|
| 60 | - } |
|
| 49 | + /** |
|
| 50 | + * @param ThemingDefaults $theming |
|
| 51 | + * @param Util $util |
|
| 52 | + * @param IURLGenerator $url |
|
| 53 | + * @param IConfig $config |
|
| 54 | + */ |
|
| 55 | + public function __construct(ThemingDefaults $theming, Util $util, IURLGenerator $url, IConfig $config) { |
|
| 56 | + $this->theming = $theming; |
|
| 57 | + $this->util = $util; |
|
| 58 | + $this->url = $url; |
|
| 59 | + $this->config = $config; |
|
| 60 | + } |
|
| 61 | 61 | |
| 62 | - /** |
|
| 63 | - * Return this classes capabilities |
|
| 64 | - * |
|
| 65 | - * @return array |
|
| 66 | - */ |
|
| 67 | - public function getCapabilities() { |
|
| 68 | - $backgroundLogo = $this->config->getAppValue('theming', 'backgroundMime', false); |
|
| 62 | + /** |
|
| 63 | + * Return this classes capabilities |
|
| 64 | + * |
|
| 65 | + * @return array |
|
| 66 | + */ |
|
| 67 | + public function getCapabilities() { |
|
| 68 | + $backgroundLogo = $this->config->getAppValue('theming', 'backgroundMime', false); |
|
| 69 | 69 | |
| 70 | - return [ |
|
| 71 | - 'theming' => [ |
|
| 72 | - 'name' => $this->theming->getName(), |
|
| 73 | - 'url' => $this->theming->getBaseUrl(), |
|
| 74 | - 'slogan' => $this->theming->getSlogan(), |
|
| 75 | - 'color' => $this->theming->getColorPrimary(), |
|
| 76 | - 'color-text' => $this->util->invertTextColor($this->theming->getColorPrimary()) ? '#000000' : '#FFFFFF', |
|
| 77 | - 'logo' => $this->url->getAbsoluteURL($this->theming->getLogo()), |
|
| 78 | - 'background' => $backgroundLogo === 'backgroundColor' ? |
|
| 79 | - $this->theming->getColorPrimary() : |
|
| 80 | - $this->url->getAbsoluteURL($this->theming->getBackground()), |
|
| 81 | - ], |
|
| 82 | - ]; |
|
| 83 | - } |
|
| 70 | + return [ |
|
| 71 | + 'theming' => [ |
|
| 72 | + 'name' => $this->theming->getName(), |
|
| 73 | + 'url' => $this->theming->getBaseUrl(), |
|
| 74 | + 'slogan' => $this->theming->getSlogan(), |
|
| 75 | + 'color' => $this->theming->getColorPrimary(), |
|
| 76 | + 'color-text' => $this->util->invertTextColor($this->theming->getColorPrimary()) ? '#000000' : '#FFFFFF', |
|
| 77 | + 'logo' => $this->url->getAbsoluteURL($this->theming->getLogo()), |
|
| 78 | + 'background' => $backgroundLogo === 'backgroundColor' ? |
|
| 79 | + $this->theming->getColorPrimary() : |
|
| 80 | + $this->url->getAbsoluteURL($this->theming->getBackground()), |
|
| 81 | + ], |
|
| 82 | + ]; |
|
| 83 | + } |
|
| 84 | 84 | } |
@@ -76,8 +76,7 @@ |
||
| 76 | 76 | 'color-text' => $this->util->invertTextColor($this->theming->getColorPrimary()) ? '#000000' : '#FFFFFF', |
| 77 | 77 | 'logo' => $this->url->getAbsoluteURL($this->theming->getLogo()), |
| 78 | 78 | 'background' => $backgroundLogo === 'backgroundColor' ? |
| 79 | - $this->theming->getColorPrimary() : |
|
| 80 | - $this->url->getAbsoluteURL($this->theming->getBackground()), |
|
| 79 | + $this->theming->getColorPrimary() : $this->url->getAbsoluteURL($this->theming->getBackground()), |
|
| 81 | 80 | ], |
| 82 | 81 | ]; |
| 83 | 82 | } |