ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilTestPlayerNavButton.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 require_once 'Services/UIComponent/Button/classes/class.ilLinkButton.php';
5 
13 {
17  private $nextCommand = '';
18 
22  public function getNextCommand()
23  {
24  return $this->nextCommand;
25  }
26 
30  public function setNextCommand($nextCommand)
31  {
32  $this->nextCommand = $nextCommand;
33  }
34 
38  public function render()
39  {
40  $this->prepareRender();
41 
42  $attr = array(
43  'href' => $this->getUrl() ? $this->getUrl() : "#",
44  'target' => $this->getTarget()
45  );
46 
47  if( strlen($this->getNextCommand()) )
48  {
49  $attr['data-nextcmd'] = $this->getNextCommand();
50  }
51 
52  return '<a'.$this->renderAttributes($attr).'>'.$this->renderCaption().'</a>';
53  }
54 
55  public static function getInstance()
56  {
57  return new self(self::TYPE_LINK);
58  }
59 }
renderCaption()
Prepare caption for render.
prepareRender()
Prepare render.
getTarget()
Get target.