FEATURE: add pipeline for saving also into prague-tennis-camp template
This commit is contained in:
@@ -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)
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user