Skip to content

Delete an object not permanently #96

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
hadimansouri opened this issue Jul 15, 2017 · 0 comments
Open

Delete an object not permanently #96

hadimansouri opened this issue Jul 15, 2017 · 0 comments

Comments

@hadimansouri
Copy link
Member

Method deleteObject in Pluf_Views is used to delete object from data model. In some cases we want to delete object as simple as set 'deleted' field to TRUE. Some where in REST API (such as following definition in digidoki) we determine that delete should not be permanently:

array(
            'regex' => '#^/workshop/(?P<modelId>\d+)$#',
            'model' => 'Pluf_Views',
            'method' => 'deleteObject',
            'http-method' => 'DELETE',
            'precond' => array(
                    'Pluf_Precondition::ownerRequired'
            ),
            'params' => array(
                    'model' => 'DigiDoci_Workshop',
                    'permanently' => false
            )
    )

But it removes object from data model permanently and setting 'permanently => false' has no effect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant