48 lines
1.2 KiB
PHP
48 lines
1.2 KiB
PHP
<?php
|
|
namespace App\CMS\Repositories;
|
|
|
|
use App\CMS\Contracts\Repositories\Module as IModule;
|
|
use App\Models\Module as ModuleModel;
|
|
|
|
class Module extends Repository implements IModule
|
|
{
|
|
public function getOne($id = null) {
|
|
if (!is_null($id)) {
|
|
return ModuleModel::find($id);
|
|
} else {
|
|
return new ModuleModel();
|
|
}
|
|
}
|
|
|
|
public function supportsCategories()
|
|
{
|
|
// TODO: Implement supportsCategories() method.
|
|
}
|
|
|
|
public function getCreateContentTitle()
|
|
{
|
|
// TODO: Implement getCreateContentTitle() method.
|
|
}
|
|
|
|
public function getUpdateContentTitle()
|
|
{
|
|
// TODO: Implement getUpdateContentTitle() method.
|
|
}
|
|
|
|
public function getOverviewTitle(ModuleModel $module)
|
|
{
|
|
$pageHeading = 'admin/contents.overview';
|
|
|
|
// does user want to filter results using module?
|
|
if (!is_null($module) && is_callable([$module->handler, 'getOverviewTitle'])) {
|
|
$pageHeading = call_user_func([$module->handler, 'getOverviewTitle']);
|
|
}
|
|
|
|
return $pageHeading;
|
|
}
|
|
|
|
public function all()
|
|
{
|
|
// TODO: Implement all() method.
|
|
}
|
|
} |