ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 ()
 
- 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 ()
 

Static Public Member Functions

static getInstance ()
 
- Static Public Member Functions inherited from ilLinkButton
static getInstance ()
 
- Static Public Member Functions inherited from ilButtonBase
static getInstance ()
 Factory. More...
 

Protected Member Functions

 renderCaption ()
 
- Protected Member Functions inherited from ilLinkButton
 renderCaption ()
 Prepare caption for render. More...
 
 renderAttributes (array $a_additional_attr=null)
 
- 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
 $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 56 of file class.ilTestPlayerNavButton.php.

References $nextCommand.

Referenced by render().

+ Here is the caller graph for this function:

◆ render()

ilTestPlayerNavButton::render ( )
Returns
string

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

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

73  {
74  $this->prepareRender();
75 
76  $attr = array(
77  'href' => $this->getUrl() ? $this->getUrl() : "#",
78  'target' => $this->getTarget()
79  );
80 
81  if( strlen($this->getNextCommand()) )
82  {
83  $attr['data-nextcmd'] = $this->getNextCommand();
84  }
85 
86  return '<a'.$this->renderAttributes($attr).'>'.$this->renderCaption().'</a>';
87  }
prepareRender()
Prepare render.
Create styles array
The data for the language used.
getTarget()
Get target.
+ Here is the call graph for this function:

◆ renderCaption()

ilTestPlayerNavButton::renderCaption ( )
protected

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

References ilButtonBase\$caption.

Referenced by render().

34  {
35  $caption = '';
36 
37  if ($this->leftGlyph)
38  {
39  $caption .= '<span class="'.$this->leftGlyph.'"></span> ';
40  }
41 
42  $caption .= parent::renderCaption();
43 
44  if ($this->rightGlyph)
45  {
46  $caption .= ' <span class="'.$this->rightGlyph.'"></span>';
47  }
48 
49  return $caption;
50  }
+ 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 64 of file class.ilTestPlayerNavButton.php.

References $nextCommand.

65  {
66  $this->nextCommand = $nextCommand;
67  }

◆ 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: