FEATURE: add another repositories

This commit is contained in:
Michal Kváček
2016-10-18 22:35:06 +02:00
parent 662700b4f2
commit 4f6a006ad9
47 changed files with 410 additions and 400 deletions
@@ -16,6 +16,7 @@ class EditContent implements Interaction
$page = $parameters[0];
// upload file - if provided
// todo use interaction
$file = $page->uploadTitlePhoto($request);
// let template to modify request and content page
@@ -52,13 +53,17 @@ class EditContent implements Interaction
// todo move this method out of the controller!
$data = \App\Http\Controllers\Admin\Contents\EditContent::getFields($request, array_values($fields));
// todo use Model Observer and model::original attributes
list($revision, $changedColumns) = $page->updateWithHistory($fields, $data);
$changedColumns += call_user_func_array([$page->module_handler, 'edit'], [&$page, $request, $revision]);
// move to interaction
$changedColumns += $page->uploadRelatedFiles($request, $revision);
if ($changedColumns > 0) // fire event with
{
if ($changedColumns > 0) {
Event::fire(new EditContentEvent($page, $revision));
}