Skip to content

Instantly share code, notes, and snippets.

@hanneshal
Created March 11, 2015 09:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hanneshal/0660396b5dbba4ede4bb to your computer and use it in GitHub Desktop.
Save hanneshal/0660396b5dbba4ede4bb to your computer and use it in GitHub Desktop.
TestFilter
# --
# Kernel/Output/HTML/OutputFilterTest.pm
# --
package Kernel::Output::HTML::OutputFilterTest;
use strict;
use warnings;
use File::Basename;
use FindBin qw($RealBin);
use lib dirname($RealBin);
use lib dirname($RealBin) . '/Custom';
use Kernel::System::ObjectManager;
sub new {
my ( $Type, %Param ) = @_;
# allocate new hash for object
my $Self = {};
bless( $Self, $Type );
return $Self;
}
sub Run {
my ( $Self, %Param ) = @_;
# check needed stuff
if ( !defined $Param{Data} ) {
$Kernel::OM->Get('Kernel::System::Log')->Log( Priority => 'error', Message => 'Need Data!' );
$Kernel::OM->Get('Kernel::System::Layout')->FatalDie();
}
$Kernel::OM->Get('Kernel::System::Log')->Log(
Priority => 'notice',
Message => 'RUN.'
);
return $Param{Data};
}
1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment