Kernel::System::ITSMChange::Event::ToolBarMyCABCacheDelete - cache cleanup lib
Event handler module for the toolbar cache delete in change management.
new()
create an object
use Kernel::Config;
use Kernel::System::Encode;
use Kernel::System::Log;
use Kernel::System::DB;
use Kernel::System::Main;
use Kernel::System::Time;
use Kernel::System::ITSMChange::Event::ToolBarMyCABCacheDelete;
my $ConfigObject = Kernel::Config->new();
my $EncodeObject = Kernel::System::Encode->new(
ConfigObject => $ConfigObject,
);
my $LogObject = Kernel::System::Log->new(
ConfigObject => $ConfigObject,
EncodeObject => $EncodeObject,
);
my $MainObject = Kernel::System::Main->new(
ConfigObject => $ConfigObject,
EncodeObject => $EncodeObject,
LogObject => $LogObject,
);
my $TimeObject = Kernel::System::Time->new(
ConfigObject => $ConfigObject,
LogObject => $LogObject,
);
my $DBObject = Kernel::System::DB->new(
ConfigObject => $ConfigObject,
EncodeObject => $EncodeObject,
LogObject => $LogObject,
MainObject => $MainObject,
);
my $EventObject = Kernel::System::ITSMChange::Event::ToolBarMyCABCacheDelete->new(
ConfigObject => $ConfigObject,
EncodeObject => $EncodeObject,
LogObject => $LogObject,
DBObject => $DBObject,
TimeObject => $TimeObject,
MainObject => $MainObject,
);
Run()
The Run()
method handles the events and deletes the caches for the toolbar.
It returns 1 on success, undef
otherwise.
my $Success = $EventObject->Run(
Event => 'ChangeCABUpdatePost',
Data => {
ChangeID => 123,
CABAgents => [ 1, 2, 4 ],
},
Config => {
Event => '(ChangeCABUpdatePost|ChangeCABDeletePost)',
Module => 'Kernel::System::ITSMChange::Event::ToolBarMyCABCacheDelete',
Transaction => 0,
},
UserID => 1,
);
This software is part of the OTRS project (http://otrs.org/).
This software comes with ABSOLUTELY NO WARRANTY. For details, see the enclosed file COPYING for license information (AGPL). If you did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
Hey! The above document had some coding errors, which are explained below:
Around line 103:
=cut found outside a pod block. Skipping to next block.