ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilImageLinkButton Class Reference
+ Inheritance diagram for ilImageLinkButton:
+ Collaboration diagram for ilImageLinkButton:

Public Member Functions

 setImage ($a_value, $a_is_internal=true)
 Set image. More...
 
 getImage ()
 Get image. More...
 
 forceTitle ($a_value)
 
 hasForceTitle ()
 
- 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

 prepareRender ()
 
 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...
 

Protected Attributes

 $src
 
 $force_title
 
- 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
 

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

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

Member Function Documentation

◆ forceTitle()

ilImageLinkButton::forceTitle (   $a_value)

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

53  {
54  $this->force_title = (bool) $a_value;
55  }

◆ getImage()

ilImageLinkButton::getImage ( )

Get image.

Returns
string

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

References $src.

Referenced by renderCaption().

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

◆ getInstance()

static ilImageLinkButton::getInstance ( )
static

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

Referenced by ilBiblLibraryPresentationGUI\getButton().

19  {
20  return new self(self::TYPE_LINK);
21  }
+ Here is the caller graph for this function:

◆ hasForceTitle()

ilImageLinkButton::hasForceTitle ( )

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

References $force_title.

Referenced by renderCaption().

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

◆ prepareRender()

ilImageLinkButton::prepareRender ( )
protected

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

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

◆ renderCaption()

ilImageLinkButton::renderCaption ( )
protected

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

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

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

◆ setImage()

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

Set image.

Parameters
string$a_value
bool$a_is_internal

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

References ilUtil\getImagePath().

35  {
36  if ((bool) $a_is_internal) {
37  $a_value = ilUtil::getImagePath($a_value);
38  }
39  $this->src = trim($a_value);
40  }
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
+ Here is the call graph for this function:

Field Documentation

◆ $force_title

ilImageLinkButton::$force_title
protected

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

Referenced by hasForceTitle().

◆ $src

ilImageLinkButton::$src
protected

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

Referenced by getImage().


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