Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1245997
custom_eh.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Nov 21, 9:28 AM
Size
865 B
Mime Type
text/x-php
Expires
Sun, Nov 23, 9:28 AM (1 d, 18 h)
Engine
blob
Format
Raw Data
Handle
800642
Attached To
rMCUS Modules.Custom
custom_eh.php
View Options
<?php
defined
(
'FULL_PATH'
)
or
die
(
'restricted access!'
);
/**
* Custom event handler class
*
*/
class
CustomEventHandler
extends
kEventHandler
{
/**
* Connection to database
*
* @var kDBConnection
* @access public
*/
var
$Conn
;
function
CustomEventHandler
()
{
parent
::
kBase
();
$this
->
Conn
=&
$this
->
Application
->
GetADODBConnection
();
}
/**
* [HOOK] Modify config stored in "categories_config.php" without extending CategoriesEventHandler class
*
* @param kEvent $event
*/
function
OnModifyCategoriesConfig
(&
$event
)
{
# get Fields configuration from /core/units/categories/categories_config.php
$fields
=
$this
->
Application
->
getUnitOption
(
$event
->
MasterEvent
->
Prefix
,
'Fields'
);
# set configuration fields
$this
->
Application
->
setUnitOption
(
$event
->
MasterEvent
->
Prefix
,
'Fields'
,
$fields
);
}
}
Event Timeline
Log In to Comment