NAME
OpenInteract2::Action::CommonRemove - Task to remove an object
SYNOPSIS
# Just subclass and the task 'remove' is implemented
package OpenInteract2::Action::MyAction;
use base qw( OpenInteract2::Action::CommonRemove );
# In your action configuration:
[myaction]
SUPPORTED TASKS
This common action supports a single task:
- remove
-
Removes a single object.
DESCRIPTION FOR 'remove'
Very straightforward -- we just remove an object given an ID.
TEMPLATES USED FOR 'remove'
None.
METHODS FOR 'remove'
_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.
This method is different from the other common _*_customize
methods in that you can short-circuit the operation. If you return content from this method the object will not be removed and the content displayed.
CONFIGURATION FOR 'remove'
Basic
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.
System-created parameters
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
Copyright (c) 2002-2003 Chris Winters. All rights reserved.
AUTHORS
Chris Winters <chris@cwinters.com>