ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilJsLinkButton Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilJsLinkButton:
+ Collaboration diagram for ilJsLinkButton:

Public Member Functions

 setTarget (string $a_value)
 
 getTarget ()
 
 render ()
 
- Public Member Functions inherited from ilButton
 isFormNovalidate ()
 
 setFormNovalidate (bool $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 (string $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 (string $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 (string $form_enc_type)
 If this attribute is specified, it overrides the enctype attribute of the button's form owner. More...
 
 getFormAction ()
 
 setFormAction (string $form_action)
 The URI of a program that processes the information submitted by the button. More...
 
 getForm ()
 
 setForm (string $form)
 The form element that the button is associated with (its form owner). More...
 
 getValue ()
 
 setValue (string $value)
 The initial value of the button. More...
 
 getName ()
 
 setName (string $name, bool $is_command=true)
 The name of the button, which is submitted with the form data. More...
 
 getButtonType ()
 
 setButtonType (string $button_type)
 
 render ()
 
- Public Member Functions inherited from ilButtonBase
 __clone ()
 
 getType ()
 
 setId (?string $a_value)
 
 getId ()
 
 setCaption (string $a_value, bool $a_is_lng_id=true)
 
 getCaption (bool $a_translate=true)
 
 setPrimary (bool $a_value)
 
 isPrimary ()
 
 setOmitPreventDoubleSubmission (bool $a_value)
 Toggle double submission prevention status. More...
 
 getOmitPreventDoubleSubmission ()
 
 setOnClick (string $a_value)
 
 getOnClick ()
 
 setDisabled (bool $a_value)
 
 isDisabled ()
 
 addCSSClass (string $a_value)
 
 getCSSClasses ()
 
 applyDefaultCss (?bool $apply_default_css=null)
 
 render ()
 
 getToolbarHTML ()
 Get input item HTML to be inserted into ilToolbarGUI. More...
 
 getToolbarHTML ()
 Get input item HTML to be inserted into ilToolbarGUI. More...
 

Static Public Member Functions

static getInstance ()
 
- Static Public Member Functions inherited from ilButton
static getInstance ()
 
static getValidFormTargets ()
 
static getValidFormMethods ()
 
static getValidFormEncTypes ()
 
static getValidButtonTypes ()
 
static getInstance ()
 

Protected Member Functions

 renderCaption ()
 
- Protected Member Functions inherited from ilButtonBase
 __construct (int $a_type)
 
 setType (int $a_value)
 
 gatherCssClasses ()
 
 renderAttributesHelper (array $a_attr)
 
 renderAttributes (?array $a_additional_attr=null)
 Render current HTML attributes. More...
 
 prepareRender ()
 

Protected Attributes

string $target
 
- Protected Attributes inherited from ilButton
string $button_type = self::BUTTON_TYPE_SUBMIT
 
string $name = null
 
string $value = null
 
string $form = null
 
string $form_action = null
 
string $form_enc_type = null
 
string $form_method = null
 
string $form_target = null
 
bool $form_novalidate = false
 
- Protected Attributes inherited from ilButtonBase
ilLanguage $lng
 
int $type = 0
 
string $id = ""
 
string $caption = ""
 
bool $caption_is_lng_id = false
 
bool $primary = false
 
bool $omit_prevent_double_submission = false
 
string $onclick = ""
 
int $acc_key = 0
 
bool $disabled = false
 
array $css = array()
 
bool $apply_default_css = true
 

Additional Inherited Members

- Data Fields inherited from ilButton
const BUTTON_TYPE_BUTTON = 'button'
 The button has no default behavior. More...
 
const BUTTON_TYPE_SUBMIT = 'submit'
 The button submits the form data to the server. More...
 
const BUTTON_TYPE_RESET = 'reset'
 The button resets all the controls to their initial values. More...
 
const FORM_ENC_TYPE_APPLICATION = 'application/x-www-form-urlencoded'
 The default value if the attribute is not specified. More...
 
const FORM_ENC_TYPE_MULTI_PART = 'multipart/form-data'
 Use this value if you are using an <input> element with the type attribute set to file. More...
 
const FORM_ENC_TYPE_PLAIN = 'text/plain'
 
const FORM_METHOD_POST = 'POST'
 
const FORM_METHOD_GET = 'GET'
 
const FORM_TARGET_SELF = '_self'
 Load the response into the same browsing context as the current one. More...
 
const FORM_TARGET_BLANK = '_blank'
 Load the response into a new unnamed browsing context. More...
 
const FORM_TARGET_PARENT = '_parent'
 Load the response into the parent browsing context of the current one. More...
 
const FORM_TARGET_TOP = '_top'
 Load the response into the top-level browsing context (that is, the browsing context that is an ancestor of the current one, and has no parent). More...
 
- Data Fields inherited from ilButtonBase
const TYPE_SUBMIT = 1
 
const TYPE_LINK = 2
 
const TYPE_SPLIT = 3
 
const TYPE_BUTTON = 4
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Link Button GUI

Author
Jörg Lützenkirchen luetz.nosp@m.enki.nosp@m.rchen.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Deprecated:
9 Use KS Buttons instead

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

Member Function Documentation

◆ getInstance()

static ilJsLinkButton::getInstance ( )
static

Reimplemented from ilButton.

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

28 : self
29 {
30 return new self(self::TYPE_LINK);
31 }

References ilButtonBase\TYPE_LINK.

◆ getTarget()

ilJsLinkButton::getTarget ( )

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

38 : string
39 {
40 return $this->target;
41 }

References $target.

Referenced by render().

+ Here is the caller graph for this function:

◆ render()

ilJsLinkButton::render ( )

Reimplemented from ilButton.

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

48 : string
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 }
renderAttributes(?array $a_additional_attr=null)
Render current HTML attributes.

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

+ Here is the call graph for this function:

◆ renderCaption()

ilJsLinkButton::renderCaption ( )
protected

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

43 : string
44 {
45 return '&nbsp;' . $this->getCaption() . '&nbsp;';
46 }
getCaption(bool $a_translate=true)

References ilButtonBase\getCaption().

Referenced by render().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setTarget()

ilJsLinkButton::setTarget ( string  $a_value)

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

33 : void
34 {
35 $this->target = trim($a_value);
36 }

Field Documentation

◆ $target

string ilJsLinkButton::$target
protected

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

Referenced by getTarget().


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