Skip to content

Commit

Permalink
feat: add site() method to magicpage
Browse files Browse the repository at this point in the history
  • Loading branch information
BernhardBaumrock committed Jan 12, 2023
1 parent aa4de63 commit 8e74c63
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions MagicPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use ProcessWire\RockFrontend;
use ProcessWire\RockMigrations;
use ProcessWire\Site;

trait MagicPage
{
Expand Down Expand Up @@ -42,4 +43,9 @@ public function setPageNameFromTitle()
{
return $this->rockmigrations()->setPageNameFromTitle($this->template);
}

public function site(): Site
{
return $this->wire->modules->get('Site');
}
}
2 changes: 1 addition & 1 deletion RockMigrations.module.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public static function getModuleInfo()
{
return [
'title' => 'RockMigrations',
'version' => '2.10.0',
'version' => '2.11.0',
'summary' => 'The Ultimate Automation and Deployment-Tool for ProcessWire',
'autoload' => 2,
'singular' => true,
Expand Down

0 comments on commit 8e74c63

Please sign in to comment.