ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ILIAS\Init\Provider\StartUpMetaBarProvider Class Reference

Class StartUpMetaBarProvider. More...

+ Inheritance diagram for ILIAS\Init\Provider\StartUpMetaBarProvider:
+ Collaboration diagram for ILIAS\Init\Provider\StartUpMetaBarProvider:

Private Member Functions

 isUserLoggedIn ()
 
 isUserOnLoginPage ()
 
 appendUrlParameterString (string $existing_url, string $addition)
 
 getBaseURL ()
 

Additional Inherited Members

- Public Member Functions inherited from ILIAS\GlobalScreen\Scope\MetaBar\Provider\AbstractStaticMetaBarProvider
 __construct (Container $dic)
 @inheritDoc More...
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 __construct (Container $dic)
 @inheritDoc More...
 
 getFullyQualifiedClassName ()
 @inheritDoc More...
 
 getProviderNameForPresentation ()
 
 getFullyQualifiedClassName ()
 
 getProviderNameForPresentation ()
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Scope\MetaBar\Provider\StaticMetaBarProvider
 getMetaBarItems ()
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Scope\MetaBar\Provider\MetaBarProviderInterface
 getProviderNameForPresentation ()
 
- Data Fields inherited from ILIAS\GlobalScreen\Scope\MetaBar\Provider\StaticMetaBarProvider
const PURPOSE_MBS = "meta_bar_static"
 
- Protected Member Functions inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 globalScreen ()
 
- Protected Attributes inherited from ILIAS\GlobalScreen\Scope\MetaBar\Provider\AbstractStaticMetaBarProvider
 $dic
 
 $if
 
 $meta_bar
 
- Protected Attributes inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 $dic
 

Detailed Description

Member Function Documentation

◆ appendUrlParameterString()

ILIAS\Init\Provider\StartUpMetaBarProvider::appendUrlParameterString ( string  $existing_url,
string  $addition 
)
private

Definition at line 112 of file StartUpMetaBarProvider.php.

112 : string
113 {
114 $url = (is_int(strpos($existing_url, "?")))
115 ? $existing_url . "&" . $addition
116 : $existing_url . "?" . $addition;
117
118 $url = str_replace("?&", "?", $url);
119
120 return $url;
121 }
$url

References $url.

◆ getBaseURL()

ILIAS\Init\Provider\StartUpMetaBarProvider::getBaseURL ( )
private

Definition at line 124 of file StartUpMetaBarProvider.php.

124 : string
125 {
126 $base = substr($_SERVER["REQUEST_URI"], strrpos($_SERVER["REQUEST_URI"], "/") + 1);
127
128 return preg_replace("/&*lang=[a-z]{2}&*/", "", $base);
129 }
$base
Definition: index.php:4
$_SERVER['HTTP_HOST']
Definition: raiseError.php:10

References $_SERVER, and $base.

◆ isUserLoggedIn()

ILIAS\Init\Provider\StartUpMetaBarProvider::isUserLoggedIn ( )
private

Definition at line 98 of file StartUpMetaBarProvider.php.

98 : bool
99 {
100 return (!$this->dic->user()->isAnonymous() && $this->dic->user()->getId() != 0);
101 }

◆ isUserOnLoginPage()

ILIAS\Init\Provider\StartUpMetaBarProvider::isUserOnLoginPage ( )
private

Definition at line 104 of file StartUpMetaBarProvider.php.

104 : bool
105 {
106 $b = preg_match("%^.*/login.php$%", $_SERVER["SCRIPT_NAME"]) === 1;
107
108 return $b;
109 }

References $_SERVER, and Vendor\Package\$b.


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