ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\UI\examples\Link\Standard Namespace Reference

Functions

 base ()
 
 with_content_and_referenced_language ()
 
 with_disabled ()
 
 with_relationships ()
 
 with_tooltip ()
 

Function Documentation

◆ base()

ILIAS\UI\examples\Link\Standard\base ( )

description: > Example for rendering a standard link.

expected output: > ILIAS shows a link with the title "Goto ILIAS". Clicking the link opens the website www.ilias.de in the same

browser window.

Definition at line 33 of file base.php.

34{
35 global $DIC;
36 $f = $DIC->ui()->factory();
37 $renderer = $DIC->ui()->renderer();
38
39 return $renderer->render($f->link()->standard("Goto ILIAS", "http://www.ilias.de"));
40}
$renderer
global $DIC
Definition: shib_login.php:26

References $DIC, Vendor\Package\$f, and $renderer.

◆ with_content_and_referenced_language()

ILIAS\UI\examples\Link\Standard\with_content_and_referenced_language ( )

description: > Example for rendering a standard link including content and a referenced language

expected output: > ILIAS shows a link with thte title "Abrir ILIAS". Clicking the link opens the website www.ilias.de in the same browser window. If possible use the Developer Tools to check if the hreflang ("de") and lang tags ("es") were set

correctly.

Definition at line 36 of file with_content_and_referenced_language.php.

37{
38 global $DIC;
39 $f = $DIC->ui()->factory();
40 $renderer = $DIC->ui()->renderer();
41 $data_factaory = new DataFactory();
42
43 $link = $f->link()->standard("Abrir ILIAS", "http://www.ilias.de")
44 ->withLanguageOfReferencedContent($data_factaory->languageTag("de"))
45 ->withContentLanguage($data_factaory->languageTag("es"));
46 return $renderer->render($link);
47}

References $DIC, Vendor\Package\$f, and $renderer.

◆ with_disabled()

ILIAS\UI\examples\Link\Standard\with_disabled ( )

expected output: >

ILIAS shows the rendered Component, but it is not operable.

Definition at line 29 of file with_disabled.php.

30{
31 global $DIC;
32 $f = $DIC->ui()->factory();
33 $renderer = $DIC->ui()->renderer();
34
35 $link = $f->link()->standard("Goto ILIAS", "http://www.ilias.de")
36 ->withDisabled(true);
37 return $renderer->render($link);
38}

References $DIC, Vendor\Package\$f, and $renderer.

◆ with_relationships()

ILIAS\UI\examples\Link\Standard\with_relationships ( )

description: > Example for rendering a standard link including relationships

expected output: > ILIAS shows a link with the title "Goto ILIAS". Clicking the link opens the website www.ilias.de in the same

browser window.

Definition at line 35 of file with_relationships.php.

36{
37 global $DIC;
38 $f = $DIC->ui()->factory();
39 $renderer = $DIC->ui()->renderer();
40
41 $link = $f->link()->standard("Goto ILIAS", "http://www.ilias.de")
42 ->withAdditionalRelationshipToReferencedResource(Relationship::EXTERNAL)
43 ->withAdditionalRelationshipToReferencedResource(Relationship::BOOKMARK);
44
45 return $renderer->render($link);
46}

References $DIC, Vendor\Package\$f, and $renderer.

◆ with_tooltip()

ILIAS\UI\examples\Link\Standard\with_tooltip ( )

description: > Example for rendering a standard link with tooltips

expected output: > ILIAS shows a link. Hovering over the link will show you a tooltip with the following lines: "tooltip: ilias" and

"tooltip: learning management system".

Definition at line 33 of file with_tooltip.php.

34{
35 global $DIC;
36 $f = $DIC->ui()->factory();
37 $renderer = $DIC->ui()->renderer();
38
39 $link = $f->link()->standard("Goto ILIAS", "http://www.ilias.de")
40 ->withHelpTopics(
41 ...$f->helpTopics("ilias", "learning management system")
42 );
43 return $renderer->render($link);
44}

References $DIC, Vendor\Package\$f, and $renderer.