FEATURE: add pipeline for saving also into prague-tennis-camp template

This commit is contained in:
Michal Kváček
2017-03-10 09:52:31 +01:00
parent 9bec808d38
commit 0e2aecb529
3 changed files with 39 additions and 36 deletions
+12 -36
View File
@@ -66,46 +66,22 @@ class Handler implements TemplateHandler
'module' => 'StaticPages',
'templateName' => 'staticpages::admin.templatePath'
],
[
'module' => 'ArticleList',
'alias' => config('articlelist.alias'),
'templateName' => 'articlelist::module.templatePath'
],
[
'module' => 'Article',
'alias' => config('articleias'),
'templateName' => 'article::module.templatePath'
],
[
'module' => 'ContactForm',
'templateName' => 'contactform::admin/adminMenu.templatePath'
],
];
}
/**
* Prepare Content object to be rendered using Blade template
*
* @param Content $content
*/
public static function beforeRender(Content & $content)
{
// if ($content->isHomepage) {
$category = Category::where('url', 'trenersky-tym')
->first();
$content->traineeTeamCategory = $category;
// }
}
/**
* Modify input data into format which can be understood by edit template
*
* @param Content $content
*/
public static function beforePopulatingEditForm(Content & $content)
{
}
/**
* Slightly modify Content object before saving into database.
*
* This way we can do almost whatever we want - even in template
*
* @param Content $content
* @param $request
*/
public static function beforeSave(Content & $content, $inputData)
{
}
}