ILIAS
release_6 Revision v6.24-5-g0c8bfefb3b8
◀ ilDoc Overview
Css.php
Go to the documentation of this file.
1
<?
php
namespace
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media
;
2
3
use LogicException;
4
5
/******************************************************************************
6
* This file is part of ILIAS, a powerful learning management system.
7
* ILIAS is licensed with the GPL-3.0, you should have received a copy
8
* of said license along with the source code.
9
* If this is not the case or you just want to try ILIAS, you'll find
10
* us at:
11
* https://www.ilias.de
12
* https://github.com/ILIAS-eLearning
13
*****************************************************************************/
14
20
class
Css
extends
AbstractMediaWithPath
21
{
22
const
MEDIA_ALL
=
"all"
;
23
const
MEDIA_SCREEN
=
"screen"
;
24
const
MEDIA_PRINT
=
"print"
;
25
const
MEDIA_SPEECH
=
"speech"
;
29
private
$media
=
self::MEDIA_SCREEN
;
30
31
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
51
public
function
getMedia
() : string
52
{
53
return
$this->media
;
54
}
55
}
php
An exception for terminatinating execution or to throw for unit testing.
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media\AbstractMediaWithPath
Class AbstractMediaWithPath.
Definition:
AbstractMediaWithPath.php:8
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media\AbstractMedia\$content
$content
Definition:
AbstractMedia.php:27
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media\AbstractMedia\$version
$version
Definition:
AbstractMedia.php:31
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media\Css
Class Css.
Definition:
Css.php:21
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media\Css\getMedia
getMedia()
Definition:
Css.php:51
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media\Css\MEDIA_PRINT
const MEDIA_PRINT
Definition:
Css.php:24
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media\Css\MEDIA_SPEECH
const MEDIA_SPEECH
Definition:
Css.php:25
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media\Css\$media
$media
Definition:
Css.php:29
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media\Css\__construct
__construct(string $content, string $version, string $media=self::MEDIA_SCREEN)
Css constructor.
Definition:
Css.php:38
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media\Css\MEDIA_SCREEN
const MEDIA_SCREEN
Definition:
Css.php:23
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media\Css\MEDIA_ALL
const MEDIA_ALL
Definition:
Css.php:22
ILIAS\GlobalScreen\Provider\__construct
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
Definition:
PluginProviderHelper.php:30
ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media
Definition:
AbstractCollection.php:1
src
GlobalScreen
Scope
Layout
MetaContent
Media
Css.php
Generated on Sat Oct 4 2025 20:01:11 for ILIAS by
1.9.4 (using
Doxyfile
)