ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\GlobalScreen\Scope\Layout\ModificationHandler Class Reference

Class ModifierServices. More...

+ Collaboration diagram for ILIAS\GlobalScreen\Scope\Layout\ModificationHandler:

Public Member Functions

 __construct ()
 LayoutServices constructor. More...
 
 modifyPageWithClosure (Closure $closure_returning_page)
 
 modifyContentWithClosure (Closure $closure_returning_content)
 
 modifyMainBarWithClosure (Closure $closure_returning_main_bar)
 
 modifyMetaBarWithClosure (Closure $closure_returning_meta_bar)
 
 modifyLogoWithClosure (Closure $closure_returning_image)
 
 modifyResponsiveLogoWithClosure (Closure $closure_returning_image)
 
 modifyBreadCrumbsWithClosure (Closure $closure_returning_breadcrumbs)
 
 modifyPageBuilderWithClosure (Closure $closure_returning_page)
 
 modifyFooterWithClosure (Closure $closure_returning_footer)
 
 getPageWithPagePartProviders ()
 
 modifyTitleWithClosure (Closure $closure_returning_title)
 
 modifyShortTitleWithClosure (Closure $closure_returning_short_title)
 
 modifyViewTitleWithClosure (Closure $closure_returning_view_title)
 

Private Member Functions

 replaceWithAutoWiredInstance (string $interface, Closure $closure)
 

Private Attributes

StandardPageBuilder DecoratedPageBuilder $current_page_builder
 
StandardPagePartProvider DecoratedPagePartProvider $current_page_part_provider
 

Detailed Description

Class ModifierServices.

Definition at line 41 of file ModificationHandler.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\GlobalScreen\Scope\Layout\ModificationHandler::__construct ( )

LayoutServices constructor.

Definition at line 51 of file ModificationHandler.php.

52 {
53 $this->current_page_builder = new StandardPageBuilder();
54 $this->current_page_part_provider = new StandardPagePartProvider();
55 }

Member Function Documentation

◆ getPageWithPagePartProviders()

ILIAS\GlobalScreen\Scope\Layout\ModificationHandler::getPageWithPagePartProviders ( )
Returns
Page

Definition at line 146 of file ModificationHandler.php.

146 : Page
147 {
148 return $this->current_page_builder->build($this->current_page_part_provider);
149 }

◆ modifyBreadCrumbsWithClosure()

ILIAS\GlobalScreen\Scope\Layout\ModificationHandler::modifyBreadCrumbsWithClosure ( Closure  $closure_returning_breadcrumbs)
Parameters
Closure$closure_returning_breadcrumbsHave a look at the README.md for an example.

Definition at line 122 of file ModificationHandler.php.

122 : void
123 {
124 $this->replaceWithAutoWiredInstance(Breadcrumbs::class, $closure_returning_breadcrumbs);
125 }
replaceWithAutoWiredInstance(string $interface, Closure $closure)

References ILIAS\GlobalScreen\Scope\Layout\ModificationHandler\replaceWithAutoWiredInstance().

+ Here is the call graph for this function:

◆ modifyContentWithClosure()

ILIAS\GlobalScreen\Scope\Layout\ModificationHandler::modifyContentWithClosure ( Closure  $closure_returning_content)
Parameters
Closure$closure_returning_contentHave a look at the README.md for an example.

Definition at line 78 of file ModificationHandler.php.

78 : void
79 {
80 $this->replaceWithAutoWiredInstance(Content::class, $closure_returning_content);
81 }

References ILIAS\GlobalScreen\Scope\Layout\ModificationHandler\replaceWithAutoWiredInstance().

+ Here is the call graph for this function:

◆ modifyFooterWithClosure()

ILIAS\GlobalScreen\Scope\Layout\ModificationHandler::modifyFooterWithClosure ( Closure  $closure_returning_footer)
Parameters
Closure$closure_returning_footer

Definition at line 138 of file ModificationHandler.php.

138 : void
139 {
140 $this->replaceWithAutoWiredInstance(Footer::class, $closure_returning_footer);
141 }

References ILIAS\GlobalScreen\Scope\Layout\ModificationHandler\replaceWithAutoWiredInstance().

+ Here is the call graph for this function:

◆ modifyLogoWithClosure()

ILIAS\GlobalScreen\Scope\Layout\ModificationHandler::modifyLogoWithClosure ( Closure  $closure_returning_image)
Parameters
Closure$closure_returning_imageHave a look at the README.md for an example.

Definition at line 105 of file ModificationHandler.php.

References ILIAS\GlobalScreen\Scope\Layout\Provider\PagePart\DecoratedPagePartProvider\PURPOSE_LOGO, and ILIAS\GlobalScreen\Scope\Layout\ModificationHandler\replaceWithAutoWiredInstance().

+ Here is the call graph for this function:

◆ modifyMainBarWithClosure()

ILIAS\GlobalScreen\Scope\Layout\ModificationHandler::modifyMainBarWithClosure ( Closure  $closure_returning_main_bar)
Parameters
Closure$closure_returning_main_barHave a look at the README.md for an example.

Definition at line 87 of file ModificationHandler.php.

87 : void
88 {
89 $this->replaceWithAutoWiredInstance(MainBar::class, $closure_returning_main_bar);
90 }

References ILIAS\GlobalScreen\Scope\Layout\ModificationHandler\replaceWithAutoWiredInstance().

+ Here is the call graph for this function:

◆ modifyMetaBarWithClosure()

ILIAS\GlobalScreen\Scope\Layout\ModificationHandler::modifyMetaBarWithClosure ( Closure  $closure_returning_meta_bar)
Parameters
Closure$closure_returning_meta_barHave a look at the README.md for an example.

Definition at line 96 of file ModificationHandler.php.

96 : void
97 {
98 $this->replaceWithAutoWiredInstance(MetaBar::class, $closure_returning_meta_bar);
99 }

References ILIAS\GlobalScreen\Scope\Layout\ModificationHandler\replaceWithAutoWiredInstance().

+ Here is the call graph for this function:

◆ modifyPageBuilderWithClosure()

ILIAS\GlobalScreen\Scope\Layout\ModificationHandler::modifyPageBuilderWithClosure ( Closure  $closure_returning_page)
Parameters
Closure$closure_returning_page

Definition at line 130 of file ModificationHandler.php.

130 : void
131 {
132 $this->current_page_builder = new DecoratedPageBuilder($this->current_page_builder, $closure_returning_page);
133 }

◆ modifyPageWithClosure()

ILIAS\GlobalScreen\Scope\Layout\ModificationHandler::modifyPageWithClosure ( Closure  $closure_returning_page)
Parameters
Closure$closure_returning_pageYou can pass a Closure which will get the Page as the first argument and MUST return a Page as well. Have a look at the README.md for an example.

Definition at line 69 of file ModificationHandler.php.

69 : void
70 {
71 $this->current_page_builder = new DecoratedPageBuilder($this->current_page_builder, $closure_returning_page);
72 }

◆ modifyResponsiveLogoWithClosure()

ILIAS\GlobalScreen\Scope\Layout\ModificationHandler::modifyResponsiveLogoWithClosure ( Closure  $closure_returning_image)

◆ modifyShortTitleWithClosure()

ILIAS\GlobalScreen\Scope\Layout\ModificationHandler::modifyShortTitleWithClosure ( Closure  $closure_returning_short_title)

◆ modifyTitleWithClosure()

ILIAS\GlobalScreen\Scope\Layout\ModificationHandler::modifyTitleWithClosure ( Closure  $closure_returning_title)

◆ modifyViewTitleWithClosure()

ILIAS\GlobalScreen\Scope\Layout\ModificationHandler::modifyViewTitleWithClosure ( Closure  $closure_returning_view_title)

◆ replaceWithAutoWiredInstance()

Field Documentation

◆ $current_page_builder

StandardPageBuilder DecoratedPageBuilder ILIAS\GlobalScreen\Scope\Layout\ModificationHandler::$current_page_builder
private

Definition at line 45 of file ModificationHandler.php.

◆ $current_page_part_provider

StandardPagePartProvider DecoratedPagePartProvider ILIAS\GlobalScreen\Scope\Layout\ModificationHandler::$current_page_part_provider
private

Definition at line 46 of file ModificationHandler.php.


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