ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilDclLinkButton Class Reference
+ Inheritance diagram for ilDclLinkButton:
+ Collaboration diagram for ilDclLinkButton:

Public Member Functions

 isUseWrapper ()
 
 setUseWrapper ($useWrapper)
 
 prepareRender ()
 
 render ()
 
 addAttribute ($key, $value, $wrapper=false)
 
 removeAttribute ($key, $wrapper=false)
 
 getAttribute ($key, $wrapper=false)
 
- 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...
 

Data Fields

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

Protected Member Functions

 getGroupKey ($wrapper)
 
- 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

 $attributes
 
 $useWrapper = false
 
- 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
 

Detailed Description

Author
Michael Herren mh@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch

Definition at line 7 of file class.ilDclLinkButton.php.

Member Function Documentation

◆ addAttribute()

ilDclLinkButton::addAttribute (   $key,
  $value,
  $wrapper = false 
)

Definition at line 61 of file class.ilDclLinkButton.php.

References $key, and getGroupKey().

Referenced by prepareRender().

62  {
63  $this->attributes[$this->getGroupKey($wrapper)][$key] = $value;
64  }
$key
Definition: croninfo.php:18
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAttribute()

ilDclLinkButton::getAttribute (   $key,
  $wrapper = false 
)

Definition at line 75 of file class.ilDclLinkButton.php.

References $key, and getGroupKey().

76  {
77  if (isset($this->attributes[$this->getGroupKey($wrapper)][$key])) {
78  return $this->attributes[$this->getGroupKey($wrapper)][$key];
79  }
80  return null;
81  }
$key
Definition: croninfo.php:18
+ Here is the call graph for this function:

◆ getGroupKey()

ilDclLinkButton::getGroupKey (   $wrapper)
protected

Definition at line 83 of file class.ilDclLinkButton.php.

Referenced by addAttribute(), getAttribute(), and removeAttribute().

84  {
85  return ($wrapper)? 'wrapper' : 'default';
86  }
+ Here is the caller graph for this function:

◆ getInstance()

static ilDclLinkButton::getInstance ( )
static

Definition at line 31 of file class.ilDclLinkButton.php.

Referenced by ilDclTableViewTableGUI\buildAction().

32  {
33  return new self(self::TYPE_DATACOLLECTION_LINK);
34  }
+ Here is the caller graph for this function:

◆ isUseWrapper()

ilDclLinkButton::isUseWrapper ( )
Returns
boolean

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

References $useWrapper.

19  {
20  return $this->useWrapper;
21  }

◆ prepareRender()

ilDclLinkButton::prepareRender ( )

Definition at line 36 of file class.ilDclLinkButton.php.

References addAttribute(), ilLinkButton\getTarget(), and ilLinkButton\getUrl().

Referenced by render().

37  {
38  parent::prepareRender();
39 
40  $this->addAttribute('href', ($this->getUrl() ? $this->getUrl() : "#"));
41  $this->addAttribute('target', $this->getTarget());
42  }
addAttribute($key, $value, $wrapper=false)
getTarget()
Get target.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeAttribute()

ilDclLinkButton::removeAttribute (   $key,
  $wrapper = false 
)

Definition at line 66 of file class.ilDclLinkButton.php.

References $key, and getGroupKey().

67  {
68  if (isset($this->attributes[$this->getGroupKey($wrapper)][$key])) {
69  unset($this->attributes[$this->getGroupKey($wrapper)][$key]);
70  return true;
71  }
72  return false;
73  }
$key
Definition: croninfo.php:18
+ Here is the call graph for this function:

◆ render()

ilDclLinkButton::render ( )

Definition at line 44 of file class.ilDclLinkButton.php.

References $output, prepareRender(), ilLinkButton\renderAttributes(), ilButtonBase\renderAttributesHelper(), and ilLinkButton\renderCaption().

45  {
46  $this->prepareRender();
47 
48  $output = '';
49  if ($this->useWrapper) {
50  $output .= '<div' . $this->renderAttributesHelper($this->attributes['wrapper']) . '>';
51  }
52 
53  $output .= '<a' . $this->renderAttributes($this->attributes['default']) . '>' . $this->renderCaption() . '</a>';
54 
55  if ($this->useWrapper) {
56  $output .= '</div>';
57  }
58  return $output;
59  }
renderAttributesHelper(array $a_attr)
Render HTML node attributes.
renderAttributes(array $a_additional_attr=null)
renderCaption()
Prepare caption for render.
if(!is_dir( $entity_dir)) exit("Fatal Error ([A-Za-z0-9]+)\+" &#(? foreach( $entity_files as $file) $output
+ Here is the call graph for this function:

◆ setUseWrapper()

ilDclLinkButton::setUseWrapper (   $useWrapper)
Parameters
boolean$useWrapper

Definition at line 26 of file class.ilDclLinkButton.php.

References $useWrapper.

27  {
28  $this->useWrapper = $useWrapper;
29  }

Field Documentation

◆ $attributes

ilDclLinkButton::$attributes
protected

Definition at line 11 of file class.ilDclLinkButton.php.

◆ $useWrapper

ilDclLinkButton::$useWrapper = false
protected

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

Referenced by isUseWrapper(), and setUseWrapper().

◆ TYPE_DATACOLLECTION_LINK

const ilDclLinkButton::TYPE_DATACOLLECTION_LINK = 99

Definition at line 9 of file class.ilDclLinkButton.php.


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