ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilImageLinkButton Class Reference
+ Inheritance diagram for ilImageLinkButton:
+ Collaboration diagram for ilImageLinkButton:

Public Member Functions

 setImage ($a_value, $a_is_internal=true)
 Set image.
 getImage ()
 Get image.
 forceTitle ($a_value)
 hasForceTitle ()
- Public Member Functions inherited from ilLinkButton
 setUrl ($a_value)
 Set URL.
 getUrl ()
 Get URL.
 setTarget ($a_value)
 Set target.
 getTarget ()
 Get target.
 render ()
 Render HTML.
- Public Member Functions inherited from ilButton
 __clone ()
 Clone instance.
 getType ()
 Get button type.
 setId ($a_value)
 Set id.
 getId ()
 Get id.
 setCaption ($a_value, $a_is_lng_id=true)
 Set caption.
 getCaption ($a_translate=true)
 Get caption.
 setPrimary ($a_value)
 Toggle primary status.
 isPrimary ()
 Get primary status.
 setOmitPreventDoubleSubmission ($a_value)
 Toggle double submission prevention status.
 getOmitPreventDoubleSubmission ()
 Get double submission prevention status.
 setOnClick ($a_value)
 Set onclick.
 getOnClick ()
 Get onclick.
 setAccessKey ($a_value)
 Set access key.
 getAccessKey ()
 Get access key.
 setDisabled ($a_value)
 Toggle disabled status.
 isDisabled ()
 Get disabled status.
 addCSSClass ($a_value)
 Add CSS class.
 getCSSClasses ()
 Get CSS class(es)

Static Public Member Functions

static getInstance ()
 Factory.

Protected Member Functions

 prepareRender ()
 Prepare render.
 renderCaption ()
 Prepare caption for render.

Protected Attributes

 $src
 $force_title
- Protected Attributes inherited from ilLinkButton
 $url
 $target
- Protected Attributes inherited from ilButton
 $type
 $id
 $caption
 $caption_is_lng_id
 $primary
 $omit_prevent_double_submission
 $onclick
 $acc_key
 $disabled
 $css = array()

Additional Inherited Members

- Data Fields inherited from ilButton
const TYPE_SUBMIT = 1
const TYPE_LINK = 2

Detailed Description

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

Member Function Documentation

ilImageLinkButton::forceTitle (   $a_value)

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

{
$this->force_title = (bool)$a_value;
}
ilImageLinkButton::getImage ( )

Get image.

Returns
string

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

References $src.

Referenced by renderCaption().

{
return $this->src;
}

+ Here is the caller graph for this function:

static ilImageLinkButton::getInstance ( )
static

Factory.

Returns
self

Reimplemented from ilLinkButton.

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

References ilButton\TYPE_LINK.

Referenced by ilBibliographicSetting\getButton().

{
return new self(self::TYPE_LINK);
}

+ Here is the caller graph for this function:

ilImageLinkButton::hasForceTitle ( )

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

References $force_title.

Referenced by renderCaption().

{
}

+ Here is the caller graph for this function:

ilImageLinkButton::prepareRender ( )
protected

Prepare render.

Reimplemented from ilButton.

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

{
// get rid of parent "submit" css class...
}
ilImageLinkButton::renderCaption ( )
protected

Prepare caption for render.

Returns
string

Reimplemented from ilLinkButton.

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

References ilButton\getCaption(), getImage(), and hasForceTitle().

{
$attr = array();
$attr["src"] = $this->getImage();
$attr["alt"] = $this->getCaption();
if($this->hasForceTitle())
{
$attr["title"] = $this->getCaption();
}
return '<img'.$this->renderAttributesHelper($attr).' />';
}

+ Here is the call graph for this function:

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

{
if((bool)$a_is_internal)
{
$a_value = ilUtil::getImagePath($a_value);
}
$this->src = trim($a_value);
}

+ Here is the call graph for this function:

Field Documentation

ilImageLinkButton::$force_title
protected

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

Referenced by hasForceTitle().

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: