ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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
 $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 58 of file class.ilDclLinkButton.php.

References getGroupKey().

Referenced by prepareRender().

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

References getGroupKey().

70  {
71  if(isset($this->attributes[$this->getGroupKey($wrapper)][$key])) {
72  return $this->attributes[$this->getGroupKey($wrapper)][$key];
73  }
74  return null;
75  }
+ Here is the call graph for this function:

◆ getGroupKey()

ilDclLinkButton::getGroupKey (   $wrapper)
protected

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

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

77  {
78  return ($wrapper)? 'wrapper' : 'default';
79  }
+ Here is the caller graph for this function:

◆ getInstance()

static ilDclLinkButton::getInstance ( )
static

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

Referenced by ilDclTableViewTableGUI\buildAction().

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

◆ isUseWrapper()

ilDclLinkButton::isUseWrapper ( )
Returns
boolean

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

References $useWrapper.

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

◆ prepareRender()

ilDclLinkButton::prepareRender ( )

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

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

Referenced by render().

35  {
36  parent::prepareRender();
37 
38  $this->addAttribute('href', ($this->getUrl() ? $this->getUrl() : "#"));
39  $this->addAttribute('target', $this->getTarget());
40  }
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 62 of file class.ilDclLinkButton.php.

References getGroupKey().

62  {
63  if(isset($this->attributes[$this->getGroupKey($wrapper)][$key])) {
64  unset($this->attributes[$this->getGroupKey($wrapper)][$key]);
65  return true;
66  }
67  return false;
68  }
+ Here is the call graph for this function:

◆ render()

ilDclLinkButton::render ( )

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

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

42  {
43  $this->prepareRender();
44 
45  $output = '';
46  if($this->useWrapper) {
47  $output .= '<div'.$this->renderAttributesHelper($this->attributes['wrapper']).'>';
48  }
49 
50  $output .= '<a'.$this->renderAttributes($this->attributes['default']).'>'.$this->renderCaption().'</a>';
51 
52  if($this->useWrapper) {
53  $output .= '</div>';
54  }
55  return $output;
56  }
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 25 of file class.ilDclLinkButton.php.

References $useWrapper.

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

Field Documentation

◆ $attributes

ilDclLinkButton::$attributes
protected

Definition at line 10 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 8 of file class.ilDclLinkButton.php.


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