ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 ($a_value)
 Set URL. More...
 
 getUrl ()
 Get URL. More...
 
 setTarget ($a_value)
 Set target. More...
 
 getTarget ()
 Get target. More...
 
 render ()
 Render HTML. More...
 
- Public Member Functions inherited from ilButtonBase
 __clone ()
 Clone instance. More...
 
 getType ()
 Get button type. More...
 
 setId ($a_value)
 Set id. More...
 
 getId ()
 Get id. More...
 
 setCaption ($a_value, $a_is_lng_id=true)
 Set caption. More...
 
 getCaption ($a_translate=true)
 Get caption. More...
 
 setPrimary ($a_value)
 Toggle primary status. More...
 
 isPrimary ()
 Get primary status. More...
 
 setOmitPreventDoubleSubmission ($a_value)
 Toggle double submission prevention status. More...
 
 getOmitPreventDoubleSubmission ()
 Get double submission prevention status. More...
 
 setOnClick ($a_value)
 Set onclick. More...
 
 getOnClick ()
 Get onclick. More...
 
 setAccessKey ($a_value)
 Set access key. More...
 
 getAccessKey ()
 Get access key. More...
 
 setDisabled ($a_value)
 Toggle disabled status. More...
 
 isDisabled ()
 Get disabled status. More...
 
 addCSSClass ($a_value)
 Add CSS class. More...
 
 getCSSClasses ()
 Get CSS class(es) More...
 
 applyDefaultCss ($apply_default_css=null)
 
 render ()
 Render HTML. More...
 
 getToolbarHTML ()
 
 getToolbarHTML ()
 Get input item HTML to be inserted into ilToolbarGUI. More...
 

Static Public Member Functions

static getInstance ()
 Factory. More...
 
static getInstance ()
 Factory. More...
 
static getInstance ()
 Factory. More...
 

Protected Member Functions

 renderCaption ()
 Prepare caption for render. More...
 
- Protected Member Functions inherited from ilLinkButton
 renderCaption ()
 Prepare caption for render. More...
 
 renderAttributes (array $a_additional_attr=null)
 Render current HTML attributes.
Parameters
array$a_additional_attr
Returns
string
More...
 
- Protected Member Functions inherited from ilButtonBase
 __construct ($a_type)
 Constructor. More...
 
 setType ($a_value)
 Set button type. More...
 
 gatherCssClasses ()
 Gather all active CSS classes. More...
 
 renderAttributesHelper (array $a_attr)
 Render HTML node attributes. More...
 
 renderAttributes (array $a_additional_attr=null)
 Render current HTML attributes. More...
 
 prepareRender ()
 Prepare render. More...
 

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
 $url
 
 $target
 
- Protected Attributes inherited from ilButtonBase
 $lng
 
 $type
 
 $id
 
 $caption
 
 $caption_is_lng_id
 
 $primary
 
 $omit_prevent_double_submission
 
 $onclick
 
 $acc_key
 
 $disabled
 
 $css = array()
 
 $apply_default_css = true
 

Detailed Description

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

Member Function Documentation

◆ getInstance()

◆ getNextCommand()

ilTestPlayerNavButton::getNextCommand ( )
Returns
string

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

References $nextCommand.

Referenced by render().

+ Here is the caller graph for this function:

◆ render()

ilTestPlayerNavButton::render ( )
Returns
string

Reimplemented from ilLinkButton.

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

71 {
72 $this->prepareRender();
73
74 $attr = array(
75 'href' => $this->getUrl() ? $this->getUrl() : "#",
76 'target' => $this->getTarget()
77 );
78
79 if (strlen($this->getNextCommand())) {
80 $attr['data-nextcmd'] = $this->getNextCommand();
81 }
82
83 return '<a' . $this->renderAttributes($attr) . '>' . $this->renderCaption() . '</a>';
84 }
prepareRender()
Prepare render.
getTarget()
Get target.
renderAttributes(array $a_additional_attr=null)
Render current HTML attributes.string
renderCaption()
Prepare caption for render.

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

+ Here is the call graph for this function:

◆ renderCaption()

ilTestPlayerNavButton::renderCaption ( )
protected

Prepare caption for render.

Returns
string

Reimplemented from ilLinkButton.

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

34 {
35 $caption = '';
36
37 if ($this->leftGlyph) {
38 $caption .= '<span class="' . $this->leftGlyph . '"></span> ';
39 }
40
41 $caption .= parent::renderCaption();
42
43 if ($this->rightGlyph) {
44 $caption .= ' <span class="' . $this->rightGlyph . '"></span>';
45 }
46
47 return $caption;
48 }

References ilButtonBase\$caption.

Referenced by render().

+ Here is the caller graph for this function:

◆ setLeftGlyph()

ilTestPlayerNavButton::setLeftGlyph (   $glyph)

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

24 {
25 $this->leftGlyph = $glyph;
26 }

◆ setNextCommand()

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

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

63 {
64 $this->nextCommand = $nextCommand;
65 }

References $nextCommand.

◆ setRightGlyph()

ilTestPlayerNavButton::setRightGlyph (   $glyph)

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

29 {
30 $this->rightGlyph = $glyph;
31 }

Field Documentation

◆ $leftGlyph

ilTestPlayerNavButton::$leftGlyph = ''
private

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

◆ $nextCommand

ilTestPlayerNavButton::$nextCommand = ''
private

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

Referenced by getNextCommand(), and setNextCommand().

◆ $rightGlyph

ilTestPlayerNavButton::$rightGlyph = ''
private

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


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