diff --git a/modules/ContactForm/Handlers/ContactForm.php b/modules/ContactForm/Handlers/ContactForm.php index 74d8b906..b9ac03d7 100644 --- a/modules/ContactForm/Handlers/ContactForm.php +++ b/modules/ContactForm/Handlers/ContactForm.php @@ -2,13 +2,14 @@ namespace Modules\ContactForm\Handlers; use App\Enumerations\ModulesHandlerToId; +use App\Handlers\Contracts\ContentTitles; use App\Handlers\Handler; use App\Http\Controllers\Admin\Contents\EditContent; use App\Http\Requests\Request; use App\Models\Content; use App\Models\User; -class ContactForm extends Handler +class ContactForm extends Handler implements ContentTitles { public static function getHistoryHandler() { @@ -171,4 +172,38 @@ class ContactForm 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('contactform::module.allForms'); + } + + /** + * Title displayed above for for creating new content page + * + * @return string + */ + public static function getCreateNewTitle() + { + return trans('contactform::module.newForm'); + } + + /** + * Title for form displayed for editin content page + * + * @param Content $content + * + * @return mixed + */ + public static function getEditTitle(Content $content) + { + return trans('contactform::module.editForm'); + } } \ No newline at end of file diff --git a/modules/ContactForm/Resources/lang/en/module.php b/modules/ContactForm/Resources/lang/en/module.php index 63e4708e..3e9d374e 100644 --- a/modules/ContactForm/Resources/lang/en/module.php +++ b/modules/ContactForm/Resources/lang/en/module.php @@ -1,5 +1,8 @@ 'Contact form', - 'description' => 'Simple contact form' + 'description' => 'Simple contact form', + 'allForms' => 'All contact forms', + 'newForm' => 'Create new contact form', + 'editForm' => 'Editing contact form' ]; \ No newline at end of file diff --git a/modules/StaticPages/Handlers/StaticPage.php b/modules/StaticPages/Handlers/StaticPage.php index 6c8607ce..128dac6b 100644 --- a/modules/StaticPages/Handlers/StaticPage.php +++ b/modules/StaticPages/Handlers/StaticPage.php @@ -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'); + } } \ No newline at end of file diff --git a/modules/StaticPages/Resources/lang/en/module.php b/modules/StaticPages/Resources/lang/en/module.php index a263fd12..db22a5b4 100644 --- a/modules/StaticPages/Resources/lang/en/module.php +++ b/modules/StaticPages/Resources/lang/en/module.php @@ -1,5 +1,8 @@ 'Static pages', - 'description' => 'Static pages are intended for displaying static content on webpage.' + 'description' => 'Static pages are intended for displaying static content on webpage.', + 'allPages' => 'All static pages', + 'editPage' => 'Editing static page', + 'newPage' => 'Create new static page' ]; \ No newline at end of file