You are here

function activity_load_handler in Activity 7

Load a Handler for a given hook.

Parameters

$hook: The hook associated with the handler.

Return value

ActivityActionHandler

8 calls to activity_load_handler()
ActivityUnitTest::testCommentActivityInsert in tests/activity_unit.test
ActivityUnitTest::testNodeActivityInsert in tests/activity_unit.test
ActivityUnitTest::testUserActivityInsert in tests/activity_unit.test
ActivityWebTest::testCommentActivityLoadObjects in tests/activity_unit.test
ActivityWebTest::testNodeActivityLoadObjects in tests/activity_unit.test
Test that the node activity handler properly loads the node objects.

... See full list

File

./activity.module, line 536
Records Activity across the site and surfaces that to Views.

Code

function activity_load_handler($hook) {
  $hooks = activity_cache_get('hooks');
  $handler = new $hooks[$hook]['handler']();
  $handler->type = $hook;
  $handler->batch = $hooks[$hook]['batch'];
  return $handler;
}