101 'subtype' =>
'comment',
104 'wheres' => [
"e.guid < " . (
int)
$comment->guid],
121 $parts[
'fragment'] =
"elgg-object-{$comment->guid}";
150 if (
$item->getName() ===
'access') {
187 return "comment/view/{$entity->guid}/{$container->guid}";
208 if (
$params[
'subtype'] ===
'comment') {
253 function _elgg_comments_notification_email_subject($hook,
$type, $returnvalue,
$params) {
254 if (!is_array($returnvalue) || !is_array($returnvalue[
'params'])) {
259 if (empty($returnvalue[
'params'][
'notification'])) {
264 $notification = $returnvalue[
'params'][
'notification'];
266 if ($notification instanceof
Elgg\Notifications\Notification) {
272 $returnvalue[
'subject'] =
'Re: ' .
$container->getDisplayName();
299 'subtype' =>
'comment',
300 'container_guid' =>
$entity->getGUID(),
302 "e.access_id != {$entity->access_id}" 307 $batch = new \ElggBatch(
'elgg_get_entities',
$options, null, 25,
false);
310 $comment->access_id =
$entity->access_id;
332 $value[] =
"{$CONFIG->path}engine/tests/ElggCommentTest.php";
337 $events->registerHandler(
'init',
'system',
'_elgg_comments_init');
338 $hooks->registerHandler(
'unit_test',
'system',
'_elgg_comments_test');
elgg_http_add_url_query_elements($url, array $elements)
Sets elements in a URL's query string.
$object
These two snippets demonstrates triggering an event and how to register for that event.
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
elgg_view_resource($name, array $vars=[])
Render a resource view.
elgg parse_url
Parse a URL into its parts.
elgg forward
Meant to mimic the php forward() function by simply redirecting the user to another page...
elgg_register_plugin_hook_handler($hook, $type, $callback, $priority=500)
elgg_instanceof($entity, $type=null, $subtype=null, $class=null)
Checks if $entity is an and optionally for type and subtype.
elgg_set_ignore_access($ignore=true)
Set if Elgg's access system should be ignored.
elgg_in_context($context)
Check if this context exists anywhere in the stack.
elgg echo
Translates a string.
elgg_get_entities(array $options=array())
Returns an array of entities with optional filtering.
elgg_trigger_plugin_hook($hook, $type, $params=null, $returnvalue=null)
elgg_register_page_handler($identifier, $function)
Registers a page handler for a particular identifier.
elgg global
Pointer to the global context.
elgg_register_ajax_view($view)
Register a view to be available for ajax calls.
elgg_extract($key, $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
elgg_register_event_handler($event, $object_type, $callback, $priority=500)
elgg register_error
Wrapper function for system_messages.
elgg_http_build_url(array $parts, $html_encode=true)
Builds a URL from the a parts array like one returned by parse_url().
elgg_register_entity_type($type, $subtype=null)
Registers an entity type and subtype as a public-facing entity that should be shown in search and by ...
get_entity($guid)
Loads and returns an entity object from a guid.