FEATURE: add another repositories
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user