Elgg
Version 1.9
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
docs
examples
events
advanced.php
Go to the documentation of this file.
1
<?php
7
elgg_register_event_handler
(
'create'
,
'object'
,
'example_event_handler'
);
8
9
function
example_event_handler
($event,
$type
,
$object
) {
10
// Don't allow any non-admin users to create objects
11
// Returning false from this function will halt the creation of the object.
12
return
elgg_is_admin_logged_in
();
13
}
elgg_is_admin_logged_in
elgg_is_admin_logged_in()
Returns whether or not the viewer is currently logged in and an admin user.
Definition:
sessions.php:65
$object
$object
Definition:
upgrade.php:12
$type
$type
Definition:
add.php:8
elgg_register_event_handler
elgg_register_event_handler($event, $object_type, $callback, $priority=500)
Register a callback as an Elgg event handler.
Definition:
elgglib.php:669
example_event_handler
example_event_handler($event, $type, $object)
Definition:
advanced.php:9
Generated on Sat Dec 21 2024 00:00:34 for Elgg by
1.8.11