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

Public Member Functions

 isUseWrapper ()
 setUseWrapper ($useWrapper)
 prepareRender ()
 Prepare render.
 render ()
 Render HTML.
 addAttribute ($key, $value, $wrapper=false)
 removeAttribute ($key, $wrapper=false)
 getAttribute ($key, $wrapper=false)
- Public Member Functions inherited from ilLinkButton
 setUrl ($a_value)
 Set URL.
 getUrl ()
 Get URL.
 setTarget ($a_value)
 Set target.
 getTarget ()
 Get target.
- 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.

Data Fields

const TYPE_DATACOLLECTION_LINK = 99

Protected Member Functions

 getGroupKey ($wrapper)
- Protected Member Functions inherited from ilLinkButton
 renderCaption ()
 Prepare caption for render.
- Protected Member Functions inherited from ilButton
 __construct ($a_type)
 Constructor.
 setType ($a_value)
 Set button type.
 gatherCssClasses ()
 Gather all active CSS classes.
 renderAttributesHelper (array $a_attr)
 Render HTML node attributes.
 renderAttributes (array $a_additional_attr=null)
 Render current HTML attributes.

Protected Attributes

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

Detailed Description

Member Function Documentation

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

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

References getGroupKey().

Referenced by prepareRender().

{
$this->attributes[$this->getGroupKey($wrapper)][$key] = $value;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 70 of file class.ilDataCollectionLinkButton.php.

References getGroupKey().

{
if(isset($this->attributes[$this->getGroupKey($wrapper)][$key])) {
return $this->attributes[$this->getGroupKey($wrapper)][$key];
}
return null;
}

+ Here is the call graph for this function:

ilDataCollectionLinkButton::getGroupKey (   $wrapper)
protected

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

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

{
return ($wrapper)? 'wrapper' : 'default';
}

+ Here is the caller graph for this function:

static ilDataCollectionLinkButton::getInstance ( )
static

Factory.

Returns
self

Reimplemented from ilLinkButton.

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

References TYPE_DATACOLLECTION_LINK.

{
}
ilDataCollectionLinkButton::isUseWrapper ( )
Returns
boolean

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

References $useWrapper.

{
}
ilDataCollectionLinkButton::prepareRender ( )

Prepare render.

Reimplemented from ilButton.

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

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

Referenced by render().

{
$this->addAttribute('href', ($this->getUrl() ? $this->getUrl() : "#"));
$this->addAttribute('target', $this->getTarget());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 62 of file class.ilDataCollectionLinkButton.php.

References getGroupKey().

{
if(isset($this->attributes[$this->getGroupKey($wrapper)][$key])) {
unset($this->attributes[$this->getGroupKey($wrapper)][$key]);
return true;
}
return false;
}

+ Here is the call graph for this function:

ilDataCollectionLinkButton::render ( )

Render HTML.

Returns
string

Reimplemented from ilLinkButton.

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

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

{
$this->prepareRender();
$output = '';
if($this->useWrapper) {
$output .= '<div'.$this->renderAttributesHelper($this->attributes['wrapper']).'>';
}
$output .= '<a'.$this->renderAttributes($this->attributes['default']).'>'.$this->renderCaption().'</a>';
if($this->useWrapper) {
$output .= '</div>';
}
return $output;
}

+ Here is the call graph for this function:

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

Definition at line 25 of file class.ilDataCollectionLinkButton.php.

References $useWrapper.

{
$this->useWrapper = $useWrapper;
}

Field Documentation

ilDataCollectionLinkButton::$attributes
protected

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

ilDataCollectionLinkButton::$useWrapper = false
protected

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

Referenced by isUseWrapper(), and setUseWrapper().

const ilDataCollectionLinkButton::TYPE_DATACOLLECTION_LINK = 99

Definition at line 8 of file class.ilDataCollectionLinkButton.php.

Referenced by getInstance().


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