ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilLinkButton 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 ilLinkButton:
+ Collaboration diagram for ilLinkButton:

Public Member Functions

 setUrl (string $a_value)
 
 getUrl ()
 
 setTarget (string $a_value)
 
 getTarget ()
 
 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...
 

Static Public Member Functions

static getInstance ()
 
- Static Public Member Functions inherited from ilButtonBase
static getInstance ()
 

Protected Member Functions

 renderCaption ()
 
 renderAttributes (array $a_additional_attr=null)
 
- 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 $url = ""
 
string $target = ""
 
- 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 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:
use KS Buttons instead

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

Member Function Documentation

◆ getInstance()

static ilLinkButton::getInstance ( )
static

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

Referenced by ILIAS\Survey\InfoScreen\InfoScreenGUI\addAppraiseeInfo(), ilParticipantsTestResultsGUI\addDeleteAllTestResultsButton(), ILIAS\Survey\Mode\AbstractUIModifier\addExportAndPrintButton(), ilTestParticipantsGUI\addFinishAllPassesButton(), ilExAssignmentGUI\addPublicSubmissions(), ILIAS\Survey\InfoScreen\InfoScreenGUI\addStartResumeSection(), ilAdvancedMDTranslationGUI\addToolbarLanguageCreation(), ilTestParticipantsGUI\addUserSearchControls(), ilToolbarGUI\applyAutoStickyToSingleElement(), ilAssQuestionPreviewToolbarGUI\build(), ilTestResultsToolbarGUI\build(), ilObjCmiXapiAdministrationGUI\buildLrsTypesToolbarGUI(), ilTestPlayerConfirmationModal\buildModalButtonInstance(), ilObjStudyProgrammeSettingsGUI\buildModalHeading(), ilObjTestGUI\buildPageViewToolbar(), ilTestQuestionsTableGUI\buildQuestionRemoveButton(), ilTestSubmissionReviewGUI\buildToolbar(), ilObjEmployeeTalkGUI\cancelDeleteObject(), ilObjPDFGenerationGUI\configForm(), ilMailFolderGUI\confirmDeleteMails(), ilTestEvaluationGUI\detailedEvaluation(), ilSurveyEvaluationGUI\evaluationuser(), ilDclRecordListGUI\executeCommand(), ilStudyProgrammeRepositorySearchGUI\fillAutoCompleteToolbar(), ilRepositorySearchGUI\fillAutoCompleteToolbar(), ilPublicSubmissionsTableGUI\fillRow(), ilPortfolioPageTableGUI\fillRow(), ilPDNewsTableGUI\fillRow(), ilBiblLibraryPresentationGUI\getButton(), ilObjForumGUI\getContent(), ilAppointmentPresentationGUI\getHTML(), ILIAS\Survey\InfoScreen\InfoScreenGUI\getInfoScreenGUI(), ilExSubmissionTextGUI\getOverviewContent(), ilExSubmissionFileGUI\getOverviewContent(), ilExSubmissionTeamGUI\getOverviewContent(), ilExPeerReviewGUI\getOverviewContent(), ilExSubmissionObjectGUI\getOverviewContentBlog(), assImagemapQuestionGUI\getPreviousSolutionConfirmationCheckboxHtml(), ilObjStudyProgrammeTreeGUI\getToolbar(), ilObjSAHSLearningModule\getViewButton(), ilBiblLibraryGUI\index(), ilADNNotificationGUI\index(), ilOrgUnitPositionGUI\index(), ilMMTopItemGUI\index(), ilFileVersionsGUI\index(), ilMMSubItemGUI\index(), ilObjPortfolioTemplateGUI\infoScreenForward(), ilObjFileGUI\infoScreenForward(), ilObjCmiXapiGUI\initInfoScreenToolbar(), ilObjLearningSequenceLearnerGUI\initToolbar(), ilAccountCodesGUI\listCodes(), ilObjLanguageFolderGUI\listDeprecatedObject(), ilDclFieldListGUI\listFields(), ilSamlSettingsGUI\listIdps(), ilSurveyParticipantsGUI\listParticipantsObject(), ilContSkillAdminGUI\listProfiles(), ilDclTableListGUI\listTables(), ilOrgUnitTypeGUI\listTypes(), ilStudyProgrammeTypeGUI\listTypes(), ilSurveyPhrasesGUI\phrases(), ilTestPlayerAbstractGUI\populateDiscardSolutionModal(), ilTestPlayerAbstractGUI\populateInstantResponseModal(), ilTestPlayerAbstractGUI\populateNavWhenChangedModal(), ilObjPortfolioTemplateGUI\preview(), ilSurveyEditorGUI\questionsObject(), ilObjQuestionPoolGUI\questionsObject(), ilExplorerSelectInputGUI\render(), ilObjBlogGUI\render(), ilObjForumGUI\renderDraftContent(), ilTestQuestionNavigationGUI\renderJsLinkedButton(), ilTestQuestionNavigationGUI\renderLinkButton(), ilExAssTypeWikiTeamGUI\renderOverviewContent(), ilObjForumGUI\renderPostContent(), ilDclDetailedViewGUI\renderRecord(), ilObjForumGUI\renderSplitButton(), ilSurveyPageEditGUI\renderToolbar(), ilSurveyExecutionGUI\runShowFinishedPage(), ilObjSystemFolderGUI\setServerInfoSubTabs(), ilIndividualAssessmentMemberGUI\setToolbar(), ilDclTableViewGUI\show(), ilNewsTimelineGUI\show(), ilPortfolioRepositoryGUI\show(), ilTestResultsGUI\showCmd(), ilObjBibliographicGUI\showContent(), ilWebDAVMountInstructionsUploadGUI\showDocuments(), ilTermsOfServiceDocumentGUI\showDocuments(), ilPersonalProfileGUI\showExportImport(), ilObjMailGUI\showExternalSettingsFormObject(), ilObjFileBasedLMGUI\showInfoScreen(), ilMailingListsGUI\showMailingLists(), ilMailingListsGUI\showMembersList(), ilExerciseManagementGUI\showMultiFeedbackObject(), ilNewsForContextBlockGUI\showNews(), ilDclDetailedViewDefinitionGUI\showPage(), ilAdvancedMDSettingsGUI\showRecords(), ilMailTemplateGUI\showTemplates(), ilSkillProfileGUI\showUsers(), ilSurveyEvaluationGUI\sumscore(), ilTestPlayerConfirmationModalTest\testAddButton(), ilFileSystemGUI\uploadFile(), ilEditClipboardGUI\view(), ilObjPortfolioBaseGUI\view(), ilObjLanguageFolderGUI\viewObject(), ilObjUserFolderGUI\viewObject(), ilObjForumGUI\viewThreadObject(), and ilSurveyExecutionGUI\viewUserResults().

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

◆ getTarget()

ilLinkButton::getTarget ( )

Definition at line 55 of file class.ilLinkButton.php.

References $target.

Referenced by ilDclLinkButton\prepareRender(), ilTestPlayerNavButton\render(), render(), and renderAttributes().

55  : string
56  {
57  return $this->target;
58  }
+ Here is the caller graph for this function:

◆ getUrl()

ilLinkButton::getUrl ( )

Definition at line 45 of file class.ilLinkButton.php.

References $url.

Referenced by ilDclLinkButton\prepareRender(), ilTestPlayerNavButton\render(), and render().

45  : string
46  {
47  return $this->url;
48  }
+ Here is the caller graph for this function:

◆ render()

ilLinkButton::render ( )

Definition at line 87 of file class.ilLinkButton.php.

References getTarget(), getUrl(), ilButtonBase\prepareRender(), renderAttributes(), and renderCaption().

87  : string
88  {
89  $this->prepareRender();
90 
91  $attr = array();
92  $attr["href"] = $this->getUrl() ?: "#";
93  $attr["target"] = $this->getTarget();
94 
95  return '<a' . $this->renderAttributes($attr) . '>' .
96  $this->renderCaption() . '</a>';
97  }
renderAttributes(array $a_additional_attr=null)
+ Here is the call graph for this function:

◆ renderAttributes()

ilLinkButton::renderAttributes ( array  $a_additional_attr = null)
protected

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

References getTarget().

Referenced by ilDclLinkButton\render(), ilTestPlayerNavButton\render(), and render().

70  : string
71  {
72  if ('_blank' === $this->getTarget()) {
73  $relAttrVal = 'noopener';
74 
75  if (isset($a_additional_attr['rel'])) {
76  if (strpos($a_additional_attr['rel'], $relAttrVal) === false) {
77  $a_additional_attr['rel'] .= ' ' . $relAttrVal;
78  }
79  } else {
80  $a_additional_attr['rel'] = $relAttrVal;
81  }
82  }
83 
84  return parent::renderAttributes($a_additional_attr);
85  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderCaption()

ilLinkButton::renderCaption ( )
protected

Definition at line 65 of file class.ilLinkButton.php.

References ilButtonBase\getCaption().

Referenced by ilDclLinkButton\render(), and render().

65  : string
66  {
67  return '&nbsp;' . $this->getCaption() . '&nbsp;';
68  }
getCaption(bool $a_translate=true)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setTarget()

ilLinkButton::setTarget ( string  $a_value)

Definition at line 50 of file class.ilLinkButton.php.

50  : void
51  {
52  $this->target = trim($a_value);
53  }

◆ setUrl()

ilLinkButton::setUrl ( string  $a_value)

Definition at line 40 of file class.ilLinkButton.php.

40  : void
41  {
42  $this->url = trim($a_value);
43  }

Field Documentation

◆ $target

string ilLinkButton::$target = ""
protected

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

Referenced by getTarget().

◆ $url

string ilLinkButton::$url = ""
protected

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

Referenced by getUrl().


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