Skip to content

Commit

Permalink
Allow extract() function for fast template rendering.
Browse files Browse the repository at this point in the history
  • Loading branch information
janbarasek committed Jan 29, 2021
1 parent 74e2d64 commit fcb6ad1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/AdminBar.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,13 @@ private static function render(): string
});
try {
$args = [
'$basePath' => Url::get()->getBaseUrl(),
'$user' => self::$user,
'$panels' => self::$panels,
'$menuLinks' => self::$menuLinks,
'basePath' => Url::get()->getBaseUrl(),
'user' => self::$user,
'panels' => self::$panels,
'menuLinks' => self::$menuLinks,
];

/** @phpstan-ignore-next-line */
extract($args, EXTR_OVERWRITE);

require __DIR__ . '/assets/content.phtml';
Expand Down

0 comments on commit fcb6ad1

Please sign in to comment.