FEATURE: add customizable settings for create/edit/overview of content pages
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
namespace Modules\Blog\Article\Handlers;
|
||||
|
||||
use App\Enumerations\ModulesHandlerToId;
|
||||
use App\Handlers\Contracts\ContentTitles;
|
||||
use App\Handlers\Handler;
|
||||
use App\Http\Controllers\Admin\EditContent;
|
||||
use App\Http\Controllers\Controller;
|
||||
@@ -11,7 +12,7 @@ use App\Models\User;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
use Modules\Blog\Article\Entities\Comment;
|
||||
|
||||
class Article extends Handler
|
||||
class Article extends Handler implements ContentTitles
|
||||
{
|
||||
/**
|
||||
* Render given module into visitor area.
|
||||
@@ -89,10 +90,7 @@ class Article extends Handler
|
||||
return $changedColumns;
|
||||
}
|
||||
|
||||
public static function getOverviewTitle()
|
||||
{
|
||||
return trans('article::module.allArticles');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -139,4 +137,38 @@ class Article extends Handler
|
||||
// seed action log types
|
||||
// Artisan::call('')
|
||||
}
|
||||
|
||||
/**
|
||||
* Get translated title for pages overview of given type.
|
||||
*
|
||||
* This value is used for rendering list of all content pages of given type in administration.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getOverviewTitle()
|
||||
{
|
||||
return trans('article::module.allArticles');
|
||||
}
|
||||
|
||||
/**
|
||||
* Title displayed above for for creating new content page
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getCreateNewTitle()
|
||||
{
|
||||
return trans('article::module.newArticle');
|
||||
}
|
||||
|
||||
/**
|
||||
* Title for form displayed for editin content page
|
||||
*
|
||||
* @param Content $content
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public static function getEditTitle(Content $content)
|
||||
{
|
||||
return trans('article::module.editArticle');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user