ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilLinkButton Class Reference
+ Inheritance diagram for ilLinkButton:
+ Collaboration diagram for ilLinkButton:

Public Member Functions

 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 ilButtonBase
static getInstance ()
 Factory. More...
 

Protected Member Functions

 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

 $url
 
 $target
 
- Protected Attributes inherited from ilButtonBase
 $lng
 
 $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 ilButtonBase
const TYPE_SUBMIT = 1
 
const TYPE_LINK = 2
 
const TYPE_SPLIT = 3
 
const TYPE_BUTTON = 4
 

Detailed Description

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

Member Function Documentation

◆ getInstance()

static ilLinkButton::getInstance ( )
static

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

Referenced by ilCourseContentGUI\__showTimingsPanel(), ilObjTestGUI\addFinishAllPassesButton(), ilExAssignmentGUI\addPublicSubmissions(), ilToolbarGUI\applyAutoStickyToSingleElement(), ilSetupGUI\bt_tabs(), ilTestResultsToolbarGUI\build(), ilTestSkillEvaluationToolbarGUI\build(), ilTestInfoScreenToolbarGUI\build(), ilObjStudyProgrammeSettingsGUI\buildModalHeading(), ilObjTestGUI\buildPageViewToolbar(), ilTestSubmissionReviewGUI\buildToolbar(), ilObjPDFGenerationGUI\configForm(), ilTestEvaluationGUI\detailedEvaluation(), ilObjForumGUI\doHistoryCheck(), ilSystemStyleOverviewGUI\edit(), ilPageObjectGUI\edit(), ilSurveyEvaluationGUI\evaluation(), ilSurveyEvaluationGUI\evaluationuser(), ilObjBibliographicAdminLibrariesGUI\executeCommand(), ilDclDetailedViewDefinitionGUI\executeCommand(), ilDclRecordListGUI\executeCommand(), ilStudyProgrammeRepositorySearchGUI\fillAutoCompleteToolbar(), ilRepositorySearchGUI\fillAutoCompleteToolbar(), ilPublicSubmissionsTableGUI\fillRow(), ilPDNewsTableGUI\fillRow(), ilBibliographicSetting\getButton(), ilObjForumGUI\getContent(), ilPortfolioExerciseGUI\getExerciseInfo(), ilBlogExerciseGUI\getExerciseInfo(), ilObjForumGUI\getForumObjects(), ilAppointmentPresentationGUI\getHTML(), ilObjBlogGUI\getHTML(), ilExSubmissionTextGUI\getOverviewContent(), ilExSubmissionFileGUI\getOverviewContent(), ilExSubmissionTeamGUI\getOverviewContent(), ilExPeerReviewGUI\getOverviewContent(), ilExSubmissionObjectGUI\getOverviewContentBlog(), ilExSubmissionObjectGUI\getOverviewContentPortfolio(), assImagemapQuestionGUI\getPreviousSolutionConfirmationCheckboxHtml(), ilObjStudyProgrammeTreeGUI\getToolbar(), ilObjSAHSLearningModule\getViewButton(), ilOrgUnitPositionGUI\index(), ilObjSurveyGUI\infoScreen(), ilObjPortfolioTemplateGUI\infoScreenForward(), ilObjFileGUI\infoScreenForward(), ilWorkflowEngineDefinitionsGUI\initToolbar(), ilAccountCodesGUI\listCodes(), ilObjLanguageFolderGUI\listDeprecatedObject(), ilDclFieldListGUI\listFields(), ilSamlSettingsGUI\listIdps(), ilSurveyParticipantsGUI\listParticipantsObject(), ilDclTableListGUI\listTables(), ilOrgUnitTypeGUI\listTypes(), ilStudyProgrammeTypeGUI\listTypes(), ilObjFileBasedLMGUI\outputInfoScreen(), ilObjTestGUI\participantsObject(), ilSurveyPhrasesGUI\phrases(), ilTestInfoScreenToolbarGUI\populateDeleteDynamicTestResultsButton(), ilTestPlayerAbstractGUI\populateDiscardSolutionModal(), ilTestPlayerAbstractGUI\populateInstantResponseModal(), ilTestPlayerAbstractGUI\populateNavWhenChangedModal(), ilObjPortfolioTemplateGUI\preview(), ilSurveyEditorGUI\printViewObject(), ilSurveyEditorGUI\questionsObject(), ilObjQuestionPoolGUI\questionsObject(), ilExplorerSelectInputGUI\render(), ilObjectAddNewItemGUI\render(), ilObjBlogGUI\render(), ilObjForumGUI\renderDraftContent(), ilTestQuestionNavigationGUI\renderJsLinkedButton(), ilTestQuestionNavigationGUI\renderLinkButton(), ilObjForumGUI\renderPostContent(), ilContainerObjectiveGUI\renderProgressBar(), ilDclDetailedViewGUI\renderRecord(), ilObjForumGUI\renderSplitButton(), ilSurveyPageGUI\renderToolbar(), ilSurveyExecutionGUI\runShowFinishedPage(), ilObjSystemFolderGUI\setServerInfoSubTabs(), ilSystemStyleDocumentationGUI\show(), ilDclTableViewGUI\show(), ilNewsTimelineGUI\show(), ilPortfolioRepositoryGUI\show(), ilObjBibliographicGUI\showContent(), ilPersonalProfileGUI\showExportImport(), ilObjMailGUI\showExternalSettingsFormObject(), ilObjSessionGUI\showJoinRequestButton(), ilMailingListsGUI\showMailingLists(), ilMailingListsGUI\showMembersList(), ilExerciseManagementGUI\showMultiFeedbackObject(), ilNewsForContextBlockGUI\showNews(), ilTestPlayerDynamicQuestionSetGUI\showQuestionSelectionCmd(), ilAdvancedMDSettingsGUI\showRecords(), ilMailTemplateGUI\showTemplates(), ilFileSystemGUI\uploadFile(), ilEditClipboardGUI\view(), ilObjPortfolioBaseGUI\view(), ilObjLanguageFolderGUI\viewObject(), ilObjUserFolderGUI\viewObject(), and ilSurveyExecutionGUI\viewUserResults().

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

◆ getTarget()

ilLinkButton::getTarget ( )

Get target.

Returns
string

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

References $target.

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

64  {
65  return $this->target;
66  }
+ Here is the caller graph for this function:

◆ getUrl()

ilLinkButton::getUrl ( )

Get URL.

Returns
string

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

References $url.

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

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

◆ render()

ilLinkButton::render ( )

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

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

102  {
103  $this->prepareRender();
104 
105  $attr = array();
106  $attr["href"] = $this->getUrl() ? $this->getUrl() : "#";
107  $attr["target"] = $this->getTarget();
108 
109  return '<a' . $this->renderAttributes($attr) . '>' .
110  $this->renderCaption() . '</a>';
111  }
renderAttributes(array $a_additional_attr=null)
renderCaption()
Prepare caption for render.
prepareRender()
Prepare render.
Create styles array
The data for the language used.
getTarget()
Get target.
+ Here is the call graph for this function:

◆ renderAttributes()

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

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

References getTarget().

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

87  {
88  if ('_blank' === $this->getTarget()) {
89  if (isset($a_additional_attr['rel'])) {
90  if (strpos($a_additional_attr['rel'], 'noopener') === false) {
91  $a_additional_attr['rel'] .= ' noopener';
92  }
93  } else {
94  $a_additional_attr['rel'] = 'noopener';
95  }
96  }
97 
98  return parent::renderAttributes($a_additional_attr);
99  }
getTarget()
Get target.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderCaption()

ilLinkButton::renderCaption ( )
protected

Prepare caption for render.

Returns
string

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

References ilButtonBase\getCaption().

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

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

◆ setTarget()

ilLinkButton::setTarget (   $a_value)

Set target.

Parameters
string$a_value

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

54  {
55  $this->target = trim($a_value);
56  }

◆ setUrl()

ilLinkButton::setUrl (   $a_value)

Set URL.

Parameters
string$a_value

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

34  {
35  $this->url = trim($a_value);
36  }

Field Documentation

◆ $target

ilLinkButton::$target
protected

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

Referenced by getTarget().

◆ $url

ilLinkButton::$url
protected

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

Referenced by getUrl().


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