ILIAS  trunk Revision v11.0_alpha-1831-g8615d53dadb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\UI\examples\Link\Standard Namespace Reference

Functions

 base ()
 

description: > Example for rendering a standard link. More...

 
 with_content_and_referenced_language ()
 

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

 
 with_disabled ()
 

expected output: > ILIAS shows the rendered Component, but it is not operable. More...

 
 with_relationships ()
 

description: > Example for rendering a standard link including relationships More...

 
 with_tooltip ()
 

description: > Example for rendering a standard link with tooltips More...

 

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.

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

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:22

◆ 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.

References $DIC, Vendor\Package\$f, $renderer, and ILIAS\GlobalScreen\Scope\MetaBar\Factory\withContentLanguage().

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 }
$renderer
withContentLanguage(LanguageTag $content_language)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: shib_login.php:22
+ Here is the call graph for this function:

◆ 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.

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

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 }
$renderer
global $DIC
Definition: shib_login.php:22

◆ 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.

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

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 }
$renderer
global $DIC
Definition: shib_login.php:22

◆ 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.

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

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 }
$renderer
global $DIC
Definition: shib_login.php:22