Home | Wiki | OI 1.x Docs | OI 2.x Docs OI logo

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:

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.

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.

CONFIGURATION FOR 'remove'

Basic

c_object_type ($)

See OpenInteract2::Common

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

See OpenInteract2::Common

c_id_field

See OpenInteract2::Common

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>

Generated from the OpenInteract 1.99_03 source.


Home | Wiki | OI 1.x Docs | OI 2.x Docs
SourceForge Logo