ILIAS
trunk Revision v11.0_alpha-2638-g80c1d007f79
◀ ilDoc Overview
Css.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media
;
22
23
use
LogicException
;
24
28
class
Css
extends
AbstractMediaWithPath
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
}
43
parent::__construct
($content, $version);
44
$this->media =
$media
;
45
}
46
47
public
function
getMedia
(): string
48
{
49
return
$this->media
;
50
}
51
}
LogicException
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media\Css\__construct
__construct(string $content, string $version, string $media=self::MEDIA_SCREEN)
Definition:
Css.php:38
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media\Css\MEDIA_PRINT
const MEDIA_PRINT
Definition:
Css.php:32
$version
$version
Definition:
plugin.php:24
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media\Css\$media
string $media
Definition:
Css.php:35
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media\AbstractMediaWithPath
Definition:
AbstractMediaWithPath.php:26
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media\Css
Definition:
Css.php:28
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media\Css\getMedia
getMedia()
Definition:
Css.php:47
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media\Css\MEDIA_SPEECH
const MEDIA_SPEECH
Definition:
Css.php:33
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media\Css\MEDIA_ALL
const MEDIA_ALL
Definition:
Css.php:30
ILIAS\GlobalScreen\Provider\__construct
__construct(Container $dic, ilPlugin $plugin)
Definition:
PluginProviderHelper.php:37
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media
Definition:
AbstractCollection.php:21
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media\Css\MEDIA_SCREEN
const MEDIA_SCREEN
Definition:
Css.php:31
components
ILIAS
GlobalScreen
src
Scope
Layout
MetaContent
Media
Css.php
Generated on Sun Aug 31 2025 23:03:03 for ILIAS by
1.8.13 (using
Doxyfile
)