public function updateModel($model, FieldFactory $fieldFactory, ActionFactory $actionFactory)
    {
        //set the data model to the active model
        $this->setDataModel($model->find($model->getKey()));

        //include the item link if one was supplied
        if ($link = $this->getModelLink()) {
            $model->setAttribute('admin_item_link', $link);
        }

        //set up the model with the edit fields new data
        $model->setAttribute('administrator_edit_fields', $fieldFactory->getEditFieldsArrays(true));

        //set up the new actions data
        $model->setAttribute('administrator_actions', $actionFactory->getActionsOptions(true));
        $model->setAttribute('administrator_action_permissions', $actionFactory->getActionPermissions(true));

        return $model;
    }
public function updateModel($model, FieldFactory $fieldFactory, ActionFactory $actionFactory)
    {
        //set the data model to the active model
        $this->setDataModel($model->find($model->getKey()));

        //include the item link if one was supplied
        if ($link = $this->getModelLink()) {
            $model->setAttribute('admin_item_link', $link);
        }

        //set up the model with the edit fields new data
        $model->setAttribute('administrator_edit_fields', $fieldFactory->getEditFieldsArrays(true));

        //set up the new actions data
        $model->setAttribute('administrator_actions', $actionFactory->getActionsOptions(true));
        $model->setAttribute('administrator_action_permissions', $actionFactory->getActionPermissions(true));

        return $model;
    }
public function updateModel ( $ model , FieldFactory $ fieldFactory , ActionFactory $ actionFactory ) { //set the data model to the active model $ this -> setDataModel ( $ model -> find ( $ model -> getKey ( ) ) ) ; //include the item link if one was supplied if ( $ link = $ this -> getModelLink ( ) ) { $ model -> setAttribute ( 'admin_item_link' , $ link ) ; } //set up the model with the edit fields new data $ model -> setAttribute ( 'administrator_edit_fields' , $ fieldFactory -> getEditFieldsArrays ( true ) ) ; //set up the new actions data $ model -> setAttribute ( 'administrator_actions' , $ actionFactory -> getActionsOptions ( true ) ) ; $ model -> setAttribute ( 'administrator_action_permissions' , $ actionFactory -> getActionPermissions ( true ) ) ; return $ model ; }
Updates a model with the latest permissions, links, and fields.

@param \Illuminate\Database\Eloquent\Model       $model
@param \Frozennode\Administrator\Fields\Factory  $fieldFactory
@param \Frozennode\Administrator\Actions\Factory $actionFactory

@return \Illuminate\Database\Eloquent\Model
Updates a model with the latest permissions links and fields .