1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-09 08:17:12 +02:00

Add PR #269 for support of overriding browser title in AdminThemeFramework class

Co-authored-by: BernhardBaumrock <office@baumrock.com>
This commit is contained in:
Ryan Cramer
2023-05-02 10:02:08 -04:00
parent 908479d786
commit d832982228

View File

@@ -17,6 +17,7 @@
* @property bool $isLoggedIn
* @property bool|string $isModal
* @property bool|int $useAsLogin
* @property string $browserTitle Optional custom browser title for this request (3.0.217+)
* @method array getUserNavArray()
* @method array getPrimaryNavArray()
* @method string renderFile($basename, array $vars = [])
@@ -93,6 +94,7 @@ abstract class AdminThemeFramework extends AdminTheme {
public function __construct() {
parent::__construct();
$this->set('useAsLogin', false);
$this->set('browserTitle', '');
}
public function wired() {
@@ -580,6 +582,9 @@ abstract class AdminThemeFramework extends AdminTheme {
*/
public function getBrowserTitle() {
$browserTitle = $this->browserTitle; // custom defined browser title
if(strlen($browserTitle)) return $this->sanitizer->entities($browserTitle);
$browserTitle = $this->wire('processBrowserTitle');
$modal = $this->wire()->input->get('modal');
@@ -936,4 +941,3 @@ abstract class AdminThemeFramework extends AdminTheme {
}
}