ILIAS  release_8 Revision v8.24
ilTestPlayerNavButton Class Reference
+ Inheritance diagram for ilTestPlayerNavButton:
+ Collaboration diagram for ilTestPlayerNavButton:

Public Member Functions

 setLeftGlyph ($glyph)
 
 setRightGlyph ($glyph)
 
 getNextCommand ()
 
 setNextCommand ($nextCommand)
 
 render ()
 
- Public Member Functions inherited from ilLinkButton
 setUrl (string $a_value)
 
 getUrl ()
 
 setTarget (string $a_value)
 
 getTarget ()
 
 render ()
 
- Public Member Functions inherited from ilButtonBase
 __clone ()
 
 getType ()
 
 setId (?string $a_value)
 
 getId ()
 
 setCaption (string $a_value, bool $a_is_lng_id=true)
 
 getCaption (bool $a_translate=true)
 
 setPrimary (bool $a_value)
 
 isPrimary ()
 
 setOmitPreventDoubleSubmission (bool $a_value)
 Toggle double submission prevention status. More...
 
 getOmitPreventDoubleSubmission ()
 
 setOnClick (string $a_value)
 
 getOnClick ()
 
 setDisabled (bool $a_value)
 
 isDisabled ()
 
 addCSSClass (string $a_value)
 
 getCSSClasses ()
 
 applyDefaultCss (?bool $apply_default_css=null)
 
 render ()
 
 getToolbarHTML ()
 Get input item HTML to be inserted into ilToolbarGUI. More...
 
 getToolbarHTML ()
 Get input item HTML to be inserted into ilToolbarGUI. More...
 

Static Public Member Functions

static getInstance ()
 
static getInstance ()
 
static getInstance ()
 

Protected Member Functions

 renderCaption ()
 
- Protected Member Functions inherited from ilLinkButton
 renderCaption ()
 
 renderAttributes (array $a_additional_attr=null)
 Render current HTML attributes. More...
 
- Protected Member Functions inherited from ilButtonBase
 __construct (int $a_type)
 
 setType (int $a_value)
 
 gatherCssClasses ()
 
 renderAttributesHelper (array $a_attr)
 
 renderAttributes (array $a_additional_attr=null)
 Render current HTML attributes. More...
 
 prepareRender ()
 

Private Attributes

 $nextCommand = ''
 
 $leftGlyph = ''
 
 $rightGlyph = ''
 

Additional Inherited Members

- Data Fields inherited from ilButtonBase
const TYPE_SUBMIT = 1
 
const TYPE_LINK = 2
 
const TYPE_SPLIT = 3
 
const TYPE_BUTTON = 4
 
- Protected Attributes inherited from ilLinkButton
string $url = ""
 
string $target = ""
 
- Protected Attributes inherited from ilButtonBase
ilLanguage $lng
 
int $type = 0
 
string $id = ""
 
string $caption = ""
 
bool $caption_is_lng_id = false
 
bool $primary = false
 
bool $omit_prevent_double_submission = false
 
string $onclick = ""
 
int $acc_key = 0
 
bool $disabled = false
 
array $css = array()
 
bool $apply_default_css = true
 

Detailed Description

Definition at line 25 of file class.ilTestPlayerNavButton.php.

Member Function Documentation

◆ getInstance()

◆ getNextCommand()

ilTestPlayerNavButton::getNextCommand ( )
Returns
string

Definition at line 67 of file class.ilTestPlayerNavButton.php.

67 : string
68 {
69 return $this->nextCommand;
70 }

References $nextCommand.

Referenced by render().

+ Here is the caller graph for this function:

◆ render()

ilTestPlayerNavButton::render ( )
Returns
string

Reimplemented from ilLinkButton.

Definition at line 83 of file class.ilTestPlayerNavButton.php.

83 : string
84 {
85 $this->prepareRender();
86
87 $attr = array(
88 'href' => $this->getUrl() ? $this->getUrl() : "#",
89 'target' => $this->getTarget()
90 );
91
92 if (strlen($this->getNextCommand())) {
93 $attr['data-nextcmd'] = $this->getNextCommand();
94 }
95
96 return '<a' . $this->renderAttributes($attr) . '>' . $this->renderCaption() . '</a>';
97 }
renderAttributes(array $a_additional_attr=null)
Render current HTML attributes.

References getNextCommand(), ilLinkButton\getTarget(), ilLinkButton\getUrl(), ilButtonBase\prepareRender(), ilLinkButton\renderAttributes(), and renderCaption().

+ Here is the call graph for this function:

◆ renderCaption()

ilTestPlayerNavButton::renderCaption ( )
protected

Reimplemented from ilLinkButton.

Definition at line 46 of file class.ilTestPlayerNavButton.php.

46 : string
47 {
48 $caption = '';
49
50 if ($this->leftGlyph) {
51 $caption .= '<span class="' . $this->leftGlyph . '"></span> ';
52 }
53
54 $caption .= parent::renderCaption();
55
56 if ($this->rightGlyph) {
57 $caption .= ' <span class="' . $this->rightGlyph . '"></span>';
58 }
59
60 return $caption;
61 }

References ilButtonBase\$caption.

Referenced by render().

+ Here is the caller graph for this function:

◆ setLeftGlyph()

ilTestPlayerNavButton::setLeftGlyph (   $glyph)

Definition at line 36 of file class.ilTestPlayerNavButton.php.

37 {
38 $this->leftGlyph = $glyph;
39 }

◆ setNextCommand()

ilTestPlayerNavButton::setNextCommand (   $nextCommand)
Parameters
string$nextCommand

Definition at line 75 of file class.ilTestPlayerNavButton.php.

76 {
77 $this->nextCommand = $nextCommand;
78 }

References $nextCommand.

◆ setRightGlyph()

ilTestPlayerNavButton::setRightGlyph (   $glyph)

Definition at line 41 of file class.ilTestPlayerNavButton.php.

42 {
43 $this->rightGlyph = $glyph;
44 }

Field Documentation

◆ $leftGlyph

ilTestPlayerNavButton::$leftGlyph = ''
private

Definition at line 33 of file class.ilTestPlayerNavButton.php.

◆ $nextCommand

ilTestPlayerNavButton::$nextCommand = ''
private

Definition at line 30 of file class.ilTestPlayerNavButton.php.

Referenced by getNextCommand(), and setNextCommand().

◆ $rightGlyph

ilTestPlayerNavButton::$rightGlyph = ''
private

Definition at line 34 of file class.ilTestPlayerNavButton.php.


The documentation for this class was generated from the following file: