ILIAS
release_7 Revision v7.30-3-g800a261c036
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
l
m
p
r
s
t
w
+
Functions
_
a
b
c
f
g
h
i
r
s
t
w
+
Variables
$
c
d
e
f
g
h
j
l
m
p
s
t
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Files
File List
+
Globals
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
class.ParagraphStyleSelector.php
Go to the documentation of this file.
1
<?php
2
3
/* Copyright (c) 1998-2020 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5
namespace
ILIAS\COPage\Editor\Components\Paragraph
;
6
11
class
ParagraphStyleSelector
12
{
13
public
static
$style_selector_reset
=
"margin-top:2px; margin-bottom:2px; text-indent:0px; position:static; float:none; width: auto;"
;
14
18
protected
$ui_wrapper
;
19
23
protected
$ui
;
24
28
public
function
__construct
(
$ui_wrapper
, $style_id)
29
{
30
global
$DIC
;
31
32
$this->
ui
= $DIC->ui();
33
$this->ui_wrapper =
$ui_wrapper
;
34
$this->style_id = $style_id;
35
}
36
40
public
function
getStyleSelector
($a_selected,
$type
=
"par-action"
, $action =
"par.class"
, $attr =
"class"
)
41
{
42
$a_chars =
\ilPCParagraphGUI::_getCharacteristics
($this->style_id);
43
$ui_wrapper
=
$this->ui_wrapper
;
44
$ui
=
$this->ui
;
45
$buttons = [];
46
foreach
($a_chars as $char => $char_lang) {
47
$t =
"text_block"
;
48
$tag =
"div"
;
49
switch
($char) {
50
case
"Headline1"
: $t =
"heading1"
; $tag =
"h1"
;
break
;
51
case
"Headline2"
: $t =
"heading2"
; $tag =
"h2"
;
break
;
52
case
"Headline3"
: $t =
"heading3"
; $tag =
"h3"
;
break
;
53
}
54
$html =
'<div class="ilCOPgEditStyleSelectionItem"><'
. $tag .
' class="ilc_'
. $t .
'_'
. $char .
'" style="'
. self::$style_selector_reset .
'">'
. $char_lang .
"</"
. $tag .
"></div>"
;
55
$buttons[] =
$ui_wrapper
->getButton($html,
$type
, $action, [$attr => $char]);
56
}
57
$dd =
$ui
->factory()->dropdown()->standard($buttons)->withLabel($a_selected);
58
return
$dd;
59
}
60
}
ILIAS\COPage\Editor\Components\Paragraph\ParagraphStyleSelector\$style_selector_reset
static $style_selector_reset
Definition:
class.ParagraphStyleSelector.php:13
$type
$type
Definition:
proxy_ylocal.php:10
ILIAS\COPage\Editor\Components\Paragraph
Definition:
class.ParagraphCommandActionHandler.php:5
ilPCParagraphGUI\_getCharacteristics
static _getCharacteristics($a_style_id)
Get characteristics.
Definition:
class.ilPCParagraphGUI.php:79
ILIAS\COPage\Editor\Components\Paragraph\ParagraphStyleSelector
Definition:
class.ParagraphStyleSelector.php:11
ILIAS\COPage\Editor\Components\Paragraph\ParagraphStyleSelector\__construct
__construct($ui_wrapper, $style_id)
Constructor.
Definition:
class.ParagraphStyleSelector.php:28
ILIAS\COPage\Editor\Components\Paragraph\ParagraphStyleSelector\getStyleSelector
getStyleSelector($a_selected, $type="par-action", $action="par.class", $attr="class")
Get style selector.
Definition:
class.ParagraphStyleSelector.php:40
$DIC
global $DIC
Definition:
goto.php:24
ui
ui()
Definition:
ui.php:5
ILIAS\COPage\Editor\Components\Paragraph\ParagraphStyleSelector\$ui
$ui
Definition:
class.ParagraphStyleSelector.php:23
ILIAS\COPage\Editor\Components\Paragraph\ParagraphStyleSelector\$ui_wrapper
$ui_wrapper
Definition:
class.ParagraphStyleSelector.php:18
Services
COPage
Editor
Components
Paragraph
class.ParagraphStyleSelector.php
Generated on Thu Apr 10 2025 21:01:31 for ILIAS by
1.8.13 (using
Doxyfile
)