ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 8 of file class.ilDclLinkButton.php.

Member Function Documentation

◆ addAttribute()

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

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

References $key, and getGroupKey().

Referenced by prepareRender().

68  {
69  $this->attributes[$this->getGroupKey($wrapper)][$key] = $value;
70  }
$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 85 of file class.ilDclLinkButton.php.

References $key, and getGroupKey().

86  {
87  if (isset($this->attributes[$this->getGroupKey($wrapper)][$key])) {
88  return $this->attributes[$this->getGroupKey($wrapper)][$key];
89  }
90 
91  return null;
92  }
$key
Definition: croninfo.php:18
+ Here is the call graph for this function:

◆ getGroupKey()

ilDclLinkButton::getGroupKey (   $wrapper)
protected

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

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

96  {
97  return ($wrapper) ? 'wrapper' : 'default';
98  }
+ Here is the caller graph for this function:

◆ getInstance()

static ilDclLinkButton::getInstance ( )
static

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

Referenced by ilDclTableViewTableGUI\buildAction().

34  {
35  return new self(self::TYPE_DATACOLLECTION_LINK);
36  }
+ 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 39 of file class.ilDclLinkButton.php.

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

Referenced by render().

40  {
41  parent::prepareRender();
42 
43  $this->addAttribute('href', ($this->getUrl() ? $this->getUrl() : "#"));
44  $this->addAttribute('target', $this->getTarget());
45  }
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 73 of file class.ilDclLinkButton.php.

References $key, and getGroupKey().

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

◆ render()

ilDclLinkButton::render ( )

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

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

49  {
50  $this->prepareRender();
51 
52  $output = '';
53  if ($this->useWrapper) {
54  $output .= '<div' . $this->renderAttributesHelper($this->attributes['wrapper']) . '>';
55  }
56 
57  $output .= '<a' . $this->renderAttributes($this->attributes['default']) . '>' . $this->renderCaption() . '</a>';
58 
59  if ($this->useWrapper) {
60  $output .= '</div>';
61  }
62 
63  return $output;
64  }
renderAttributesHelper(array $a_attr)
Render HTML node attributes.
renderAttributes(array $a_additional_attr=null)
renderCaption()
Prepare caption for render.
+ Here is the call graph for this function:

◆ setUseWrapper()

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

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

References $useWrapper.

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

Field Documentation

◆ $attributes

ilDclLinkButton::$attributes
protected

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

◆ $useWrapper

ilDclLinkButton::$useWrapper = false
protected

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

Referenced by isUseWrapper(), and setUseWrapper().

◆ TYPE_DATACOLLECTION_LINK

const ilDclLinkButton::TYPE_DATACOLLECTION_LINK = 99

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


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