public function BaseUrl::getValue in More Global Variables 8
Method that implement generating value of global variable.
Return value
mixed Return value of declared variable.
Overrides GlobalVariableInterface::getValue
File
- src/
Plugin/ GlobalVariable/ BaseUrl.php, line 21
Class
- BaseUrl
- Class BaseUrlGlobalVariable.
Namespace
Drupal\mgv\Plugin\GlobalVariableCode
public function getValue() {
// Print the Base URL - for example, if you need to construct a link
// to share on social media.
global $base_url;
return $base_url;
}