ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
Css.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
23use LogicException;
24
29{
30 public const MEDIA_ALL = "all";
31 public const MEDIA_SCREEN = "screen";
32 public const MEDIA_PRINT = "print";
33 public const MEDIA_SPEECH = "speech";
34
35 private string $media = self::MEDIA_SCREEN;
36
37
38 public function __construct(string $content, string $version, string $media = self::MEDIA_SCREEN)
39 {
40 if (!in_array($media, [self::MEDIA_ALL, self::MEDIA_PRINT, self::MEDIA_SCREEN, self::MEDIA_SPEECH])) {
41 throw new LogicException("Invalid media type for CSS");
42 }
44 $this->media = $media;
45 }
46
47 public function getMedia(): string
48 {
49 return $this->media;
50 }
51}
$version
Definition: plugin.php:24
__construct(string $content, string $version, string $media=self::MEDIA_SCREEN)
Definition: Css.php:38
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc