Elgg  Version 1.9
Namespaces | Variables
save.php File Reference

Go to the source code of this file.

Namespaces

 Elgg\Core
 Activate a plugin or plugins.
 

Variables

 $entity_guid = (int) get_input('entity_guid', 0, false)
 
 $comment_guid = (int) get_input('comment_guid', 0, false)
 
 $comment_text = get_input('generic_comment')
 
 $is_edit_page = (bool) get_input('is_edit_page', false, false)
 
if(empty($comment_text)) if($comment_guid) else
 
if(! $entity$user = elgg_get_logged_in_user_entity()
 
 $comment = new ElggComment()
 
$comment description = $comment_text
 
$comment owner_guid = $user->getGUID()
 
$comment container_guid = $entity->getGUID()
 
$comment access_id = $entity->access_id
 
 $guid = $comment->save()
 

Variable Documentation

◆ $comment

$comment = new ElggComment()

Definition at line 48 of file save.php.

◆ $comment_guid

$comment_guid = (int) get_input('comment_guid', 0, false)

Definition at line 10 of file save.php.

◆ $comment_text

$comment_text = get_input('generic_comment')

Definition at line 11 of file save.php.

◆ $entity_guid

$entity_guid = (int) get_input('entity_guid', 0, false)

Definition at line 9 of file save.php.

◆ $guid

$guid = $comment->save()

Definition at line 53 of file save.php.

◆ $is_edit_page

$is_edit_page = (bool) get_input('is_edit_page', false, false)

Definition at line 12 of file save.php.

◆ $user

Definition at line 46 of file save.php.

◆ access_id

$comment access_id = $entity->access_id

Definition at line 52 of file save.php.

◆ container_guid

$comment container_guid = $entity->getGUID()

Definition at line 51 of file save.php.

◆ description

$comment description = $comment_text

Definition at line 49 of file save.php.

◆ else

if (empty( $comment_text)) if ( $comment_guid) else
Initial value:
{
$entity_guid
Definition: save.php:9
get_entity($guid)
Loads and returns an entity object from a guid.
Definition: entities.php:604
if(!elgg_is_logged_in()) $entity
Definition: save.php:17

Definition at line 38 of file save.php.

◆ owner_guid

$comment owner_guid = $user->getGUID()

Definition at line 50 of file save.php.