ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilJsLinkButton Class Reference
+ Inheritance diagram for ilJsLinkButton:
+ Collaboration diagram for ilJsLinkButton:

Public Member Functions

 setTarget ($a_value)
 Set target. More...
 
 getTarget ()
 Get target. More...
 
 render ()
 
- Public Member Functions inherited from ilButton
 isFormNovalidate ()
 
 setFormNovalidate ($form_novalidate)
 If the button is a submit button, this Boolean attribute specifies that the form is not to be validated when it is submitted. More...
 
 getFormTarget ()
 
 setFormTarget ($form_target)
 If the button is a submit button, this attribute is a name or keyword indicating where to display the response that is received after submitting the form. More...
 
 getFormMethod ()
 
 setFormMethod ($form_method)
 If the button is a submit button, this attribute specifies the HTTP method that the browser uses to submit the form. More...
 
 getFormEncType ()
 
 setFormEncType ($form_enc_type)
 If this attribute is specified, it overrides the enctype attribute of the button's form owner. More...
 
 getFormAction ()
 
 setFormAction ($form_action)
 The URI of a program that processes the information submitted by the button. More...
 
 getForm ()
 
 setForm ($form)
 The form element that the button is associated with (its form owner). More...
 
 getValue ()
 
 setValue ($value)
 The initial value of the button. More...
 
 getName ()
 
 setName ($name, $is_command=true)
 The name of the button, which is submitted with the form data. More...
 
 getButtonType ()
 
 setButtonType ($button_type)
 
 render ()
 Render HTML. More...
 
- 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 ilButton
static getInstance ()
 
static getValidFormTargets ()
 
static getValidFormMethods ()
 
static getValidFormEncTypes ()
 
static getValidButtonTypes ()
 
- Static Public Member Functions inherited from ilButtonBase
static getInstance ()
 Factory. More...
 

Protected Member Functions

 renderCaption ()
 Prepare caption for render. More...
 
- 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

 $target
 
- Protected Attributes inherited from ilButton
 $button_type = self::BUTTON_TYPE_SUBMIT
 
 $name = null
 
 $value = null
 
 $form = null
 
 $form_action = null
 
 $form_enc_type = null
 
 $form_method = null
 
 $form_target = null
 
 $form_novalidate = null
 
- 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
 

Additional Inherited Members

- Data Fields inherited from ilButton
const BUTTON_TYPE_BUTTON = 'button'
 
const BUTTON_TYPE_SUBMIT = 'submit'
 
const BUTTON_TYPE_RESET = 'reset'
 
const FORM_ENC_TYPE_APPLICATION = 'application/x-www-form-urlencoded'
 
const FORM_ENC_TYPE_MULTI_PART = 'multipart/form-data'
 
const FORM_ENC_TYPE_PLAIN = 'text/plain'
 
const FORM_METHOD_POST = 'POST'
 
const FORM_METHOD_GET = 'GET'
 
const FORM_TARGET_SELF = '_self'
 
const FORM_TARGET_BLANK = '_blank'
 
const FORM_TARGET_PARENT = '_parent'
 
const FORM_TARGET_TOP = '_top'
 
- Data Fields inherited from ilButtonBase
const TYPE_SUBMIT = 1
 
const TYPE_LINK = 2
 
const TYPE_SPLIT = 3
 
const TYPE_BUTTON = 4
 

Detailed Description

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

Member Function Documentation

◆ getInstance()

static ilJsLinkButton::getInstance ( )
static

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

Referenced by assClozeTestGUI\populateQuestionSpecificFormPart().

17  {
18  return new self(self::TYPE_LINK);
19  }
+ Here is the caller graph for this function:

◆ getTarget()

ilJsLinkButton::getTarget ( )

Get target.

Returns
string

Definition at line 34 of file class.ilJsLinkButton.php.

References $target.

Referenced by render().

35  {
36  return $this->target;
37  }
+ Here is the caller graph for this function:

◆ render()

ilJsLinkButton::render ( )

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

References array, ilButton\getName(), ilButtonBase\getOnClick(), getTarget(), ilButtonBase\prepareRender(), ilButtonBase\renderAttributes(), and renderCaption().

49  {
50  $this->prepareRender();
51 
52  $attr = array();
53 
54  $attr["target"] = $this->getTarget();
55  $attr["name"] = $this->getName();
56  $attr["onclick"] = $this->getOnClick();
57 
58  return '<a' . $this->renderAttributes($attr) . '>' .
59  $this->renderCaption() . '</a>';
60  }
getTarget()
Get target.
getOnClick()
Get onclick.
prepareRender()
Prepare render.
Create styles array
The data for the language used.
renderAttributes(array $a_additional_attr=null)
Render current HTML attributes.
renderCaption()
Prepare caption for render.
+ Here is the call graph for this function:

◆ renderCaption()

ilJsLinkButton::renderCaption ( )
protected

Prepare caption for render.

Returns
string

Definition at line 43 of file class.ilJsLinkButton.php.

References ilButtonBase\getCaption().

Referenced by render().

44  {
45  return '&nbsp;' . $this->getCaption() . '&nbsp;';
46  }
getCaption($a_translate=true)
Get caption.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setTarget()

ilJsLinkButton::setTarget (   $a_value)

Set target.

Parameters
string$a_value

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

26  {
27  $this->target = trim($a_value);
28  }

Field Documentation

◆ $target

ilJsLinkButton::$target
protected

Definition at line 14 of file class.ilJsLinkButton.php.

Referenced by getTarget().


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