fipamo/app/Repositories/PageRepository.php
ro d1c3b4a8f6
page editor template rebuilt
There are some spacing issues that need to be addressed but the page
editor template has been added and the CSS all lines up

scripting is still an issue as the backend that handles content still
isn't in place, but the front facing piece is in place so now those
components can be built

scripting is going to get an overhaul anyway, so this is a good place to
start that process
2024-03-05 15:49:30 -06:00

55 lines
1.1 KiB
PHP

<?php
namespace App\Repositories;
use App\Interfaces\PageRepositoryInterface;
use App\Services\SettingsService;
use App\Services\ContentService;
use App\Services\PaginateService;
class PageRepository implements PageRepositoryInterface
{
protected $content;
protected $setttings;
protected $paginate;
protected $pages;
public function __construct(
ContentService $contentService,
SettingsService $settingsService,
PaginateService $paginateService
) {
$this->content = $contentService;
$this->settings = $settingsService;
$this->paginate = $paginateService;
$this->pages = $this->content->loadAllPages();
}
public function getAll()
{
return $this->pages;
}
public function getById($uuid)
{
return $this->pages->where('uuid', $uuid);
}
public function delete($uuid)
{
}
public function create(array $page)
{
}
public function update($uuid, array $page)
{
}
public function getGroup($num, $limit, $sort = "all")
{
return $this->paginate->getPage($num, $limit, $sort);
}
}