Add private methods
This commit is contained in:
parent
9be929ba87
commit
c4a0c0af2d
|
@ -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(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue