Implement the StoringMedia interface on page events

parent c1cfd285
......@@ -2,9 +2,10 @@
namespace Modules\Page\Events;
use Modules\Media\Contracts\StoringMedia;
use Modules\Page\Entities\Page;
class PageWasUpdated
class PageWasUpdated implements StoringMedia
{
/**
* @var array
......@@ -20,4 +21,22 @@ class PageWasUpdated
$this->data = $data;
$this->page = $page;
}
/**
* Return the entity
* @return \Illuminate\Database\Eloquent\Model
*/
public function getEntity()
{
return $this->page;
}
/**
* Return the ALL data sent
* @return array
*/
public function getSubmissionData()
{
return $this->data;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment