ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilImageLinkButton Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilImageLinkButton:
+ Collaboration diagram for ilImageLinkButton:

Public Member Functions

 setImage (string $a_value, bool $a_is_internal=true)
 
 getImage ()
 
 forceTitle (bool $a_value)
 
 hasForceTitle ()
 
- 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...
 

Static Public Member Functions

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

Protected Member Functions

 prepareRender ()
 
 renderCaption ()
 
- Protected Member Functions inherited from ilLinkButton
 renderCaption ()
 
 renderAttributes (?array $a_additional_attr=null)
 
- 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 ()
 

Protected Attributes

string $src = ""
 
bool $force_title = false
 
- 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
 

Additional Inherited Members

- Data Fields inherited from ilButtonBase
const TYPE_SUBMIT = 1
 
const TYPE_LINK = 2
 
const TYPE_SPLIT = 3
 
const TYPE_BUTTON = 4
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Image Link Button GUI

Author
Jörg Lützenkirchen luetz.nosp@m.enki.nosp@m.rchen.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Deprecated:
9 Use KS Buttons instead

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

Member Function Documentation

◆ forceTitle()

ilImageLinkButton::forceTitle ( bool  $a_value)

Definition at line 53 of file class.ilImageLinkButton.php.

53  : void
54  {
55  $this->force_title = $a_value;
56  }

◆ getImage()

ilImageLinkButton::getImage ( )

Definition at line 48 of file class.ilImageLinkButton.php.

References $src.

Referenced by renderCaption().

48  : string
49  {
50  return $this->src;
51  }
+ Here is the caller graph for this function:

◆ getInstance()

static ilImageLinkButton::getInstance ( )
static

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

30  : self
31  {
32  return new self(self::TYPE_LINK);
33  }

◆ hasForceTitle()

ilImageLinkButton::hasForceTitle ( )

Definition at line 58 of file class.ilImageLinkButton.php.

References $force_title.

Referenced by renderCaption().

58  : bool
59  {
60  return $this->force_title;
61  }
+ Here is the caller graph for this function:

◆ prepareRender()

ilImageLinkButton::prepareRender ( )
protected

Definition at line 68 of file class.ilImageLinkButton.php.

68  : void
69  {
70  // get rid of parent "submit" css class...
71  }

◆ renderCaption()

ilImageLinkButton::renderCaption ( )
protected

Definition at line 73 of file class.ilImageLinkButton.php.

References ilButtonBase\getCaption(), getImage(), hasForceTitle(), and ilButtonBase\renderAttributesHelper().

73  : string
74  {
75  $attr = array();
76  $attr["src"] = $this->getImage();
77  $attr["alt"] = $this->getCaption();
78  if ($this->hasForceTitle()) {
79  $attr["title"] = $this->getCaption();
80  }
81  return '<img' . $this->renderAttributesHelper($attr) . ' />';
82  }
renderAttributesHelper(array $a_attr)
getCaption(bool $a_translate=true)
+ Here is the call graph for this function:

◆ setImage()

ilImageLinkButton::setImage ( string  $a_value,
bool  $a_is_internal = true 
)

Definition at line 40 of file class.ilImageLinkButton.php.

References ilUtil\getImagePath().

40  : void
41  {
42  if ($a_is_internal) {
43  $a_value = ilUtil::getImagePath($a_value);
44  }
45  $this->src = trim($a_value);
46  }
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
+ Here is the call graph for this function:

Field Documentation

◆ $force_title

bool ilImageLinkButton::$force_title = false
protected

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

Referenced by hasForceTitle().

◆ $src

string ilImageLinkButton::$src = ""
protected

Definition at line 27 of file class.ilImageLinkButton.php.

Referenced by getImage().


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