Add private methods

This commit is contained in:
philipp lang 2024-02-03 23:00:47 +01:00
parent 9be929ba87
commit c4a0c0af2d
1 changed files with 27 additions and 27 deletions

View File

@ -32,33 +32,6 @@ abstract class EventManager extends ComponentBase
$this->loadSingleEvent();
}
protected function addAssets(): void
{
// $this->addJs('assets/vendor/adrema-form/dist/main.js');
$this->addJs('http://localhost:5174/src/main.js', ['type' => 'module']);
}
protected function loadSettings(): void
{
$this->settings = [
'primary_color' => Settings::get('primary_color'),
...$this->resolvePageUrls(),
];
}
protected function loadSingleEvent(): void
{
$eventSlug = $this->property('eventSlug');
if (!$eventSlug) {
return;
}
$this->event = app(FetchSingleEvent::class)->run($eventSlug);
$this->page->title = $this->event['name'];
$this->currentUrl = url()->current();
}
public function defineProperties()
{
return [
@ -135,4 +108,31 @@ abstract class EventManager extends ComponentBase
'registerUrl' => $registerPage->url,
];
}
private function loadSingleEvent(): void
{
$eventSlug = $this->property('eventSlug');
if (!$eventSlug) {
return;
}
$this->event = app(FetchSingleEvent::class)->run($eventSlug);
$this->page->title = $this->event['name'];
$this->currentUrl = url()->current();
}
private function addAssets(): void
{
// $this->addJs('assets/vendor/adrema-form/dist/main.js');
$this->addJs('http://localhost:5174/src/main.js', ['type' => 'module']);
}
private function loadSettings(): void
{
$this->settings = [
'primary_color' => Settings::get('primary_color'),
...$this->resolvePageUrls(),
];
}
}