Skip to content

Commit

Permalink
Squashed commit for patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnysideup committed Jan 11, 2024
1 parent c20343d commit 787d250
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/EnablerExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace SilverStripe\LoginForms;

use SilverStripe\CMS\Model\SiteTree;
use SilverStripe\View\SSViewer;
use SilverStripe\Core\Extension;
use SilverStripe\Security\Security;
Expand Down Expand Up @@ -72,7 +73,7 @@ public function beforeCallActionHandler()

public function afterCallActionHandler()
{
Config::inst()->set(Security::class, 'page_class', $this->defaultPageClass);
Config::modify()->set(Security::class, 'page_class', $this->defaultPageClass);
}

/**
Expand All @@ -94,4 +95,12 @@ public function darkModeIsEnabled()
{
return Security::config()->get('enable_dark_mode');
}

public function MetaTags(?bool $showTitle = true): string
{
if (class_exists(SiteTree::class)) {
return SiteTree::create()->MetaTags($showTitle);
}
return '';
}
}

0 comments on commit 787d250

Please sign in to comment.