public function fill(array $attributes)
{
parent::fill($attributes);
/*
* When the page is saved, copy setting properties to the view bag.
* This is required for the back-end editors.
*/
if (array_key_exists('settings', $attributes) && array_key_exists('viewBag', $attributes['settings'])) {
$this->getViewBag()->setProperties($attributes['settings']['viewBag']);
$this->fillViewBagArray();
}
}