FEATURE: add translatable titles to static pages and contact form modules
This commit is contained in:
@@ -2,13 +2,14 @@
|
||||
namespace Modules\StaticPages\Handlers;
|
||||
|
||||
use App\Enumerations\ModulesHandlerToId;
|
||||
use App\Handlers\Contracts\ContentTitles;
|
||||
use App\Handlers\Handler;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\Request;
|
||||
use App\Models\Content;
|
||||
use App\Models\User;
|
||||
|
||||
class StaticPage extends Handler
|
||||
class StaticPage extends Handler implements ContentTitles
|
||||
{
|
||||
public static function registerAdminMenu(User $user)
|
||||
{
|
||||
@@ -97,4 +98,39 @@ class StaticPage extends Handler
|
||||
{
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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('staticpages::module.allPages');
|
||||
}
|
||||
|
||||
/**
|
||||
* Title displayed above for for creating new content page
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getCreateNewTitle()
|
||||
{
|
||||
return trans('staticpages::module.newPage');
|
||||
}
|
||||
|
||||
/**
|
||||
* Title for form displayed for editin content page
|
||||
*
|
||||
* @param Content $content
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public static function getEditTitle(Content $content)
|
||||
{
|
||||
return trans('staticpages::module.editPage');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user