Home | Wiki | OI 1.x Docs | OI 2.x Docs |
OpenInteract2::Action::CommonRemove - Task to remove an object
# Just subclass and the task 'remove' is implemented package OpenInteract2::Action::MyAction; use base qw( OpenInteract2::Action::CommonRemove ); # In your action configuration: [myaction]
This common action supports a single task:
Removes a single object.
Very straightforward -- we just remove an object given an ID.
None.
_remove_customize
Called before the object removal. You can record the object being
removed (found in the action parameter c_object
) or any other
action you like.
You can short-circuit the operation by throwing a die
with content
from the method. This content will be sent on to the user. This gives
you an opportunity to do any necessary validation, quota ceiling
inspections, time of day checking, etc.
c_object_type ($)
c_remove_fail_task ($)
This is the task called when some part of the remove process fails. For instance, if we cannot fetch the object requested to be removed, or if there is a misconfiguration.
Default: 'common_error'
c_remove_security_fail_task ($)
Optional task for the specific failure of security. It will be called when the user does not have sufficient access to remove the object.
If not defined we use the value of c_remove_fail_task
.
c_remove_task ($) (REQUIRED)
Task to be called when the remove succeeds. The object removed is
available in the c_object
action parameter.
c_object_class
c_id_field
c_id
The ID of the object we're trying to remove.
c_object
Set to the object to be/that was removed. This will be set in all cases except if the requested object is not found.
Copyright (c) 2002-2003 Chris Winters. All rights reserved.
Chris Winters <chris@cwinters.com>
Generated from the OpenInteract 1.99_03 source.