Elgg  Version 5.1
Variables
save.php File Reference

Go to the source code of this file.

Variables

 $entity_guid = (int) get_input('entity_guid', 0, false)
 Action for adding and editing comments. More...
 
 $comment_guid = (int) get_input('comment_guid', 0, false)
 
 $comment_text = get_input('generic_comment')
 
if(empty($comment_text)) if($comment_guid) else
 
if(!$entity instanceof\ElggEntity) if(!$entity->canComment()) $comment = new \ElggComment()
 
$comment description = $comment_text
 
if($entity instanceof\ElggComment) $comment container_guid = $entity->guid
 
$comment access_id = $entity->access_id
 
if(!$comment->save()) if($comment->getLevel()===1) $success_message = elgg_echo('generic_comment:posted')
 
 $forward = $comment->getURL()
 
if(!empty($_SERVER['HTTP_REFERER'])) $result
 

Variable Documentation

if (!$entity instanceof\ElggEntity) if (!$entity->canComment()) $comment = new \ElggComment()

Definition at line 42 of file save.php.

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

Definition at line 7 of file save.php.

$comment_text = get_input('generic_comment')

Definition at line 8 of file save.php.

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

Action for adding and editing comments.

Definition at line 6 of file save.php.

$forward = $comment->getURL()

Definition at line 75 of file save.php.

if (!empty($_SERVER['HTTP_REFERER'])) $result
Initial value:
= [
'guid' => $comment->guid
if(!$entity instanceof\ElggEntity) if(!$entity->canComment()) $comment
Definition: save.php:42

Definition at line 87 of file save.php.

if (!$comment->save()) if ($comment->getLevel()===1) $success_message = elgg_echo('generic_comment:posted')

Definition at line 72 of file save.php.

$comment access_id = $entity->access_id

Definition at line 55 of file save.php.

if ($entity instanceof\ElggComment) $comment container_guid = $entity->guid

Definition at line 54 of file save.php.

$comment description = $comment_text

Definition at line 43 of file save.php.

if (empty($comment_text)) if ($comment_guid) else
Initial value:
{
$entity_guid
Action for adding and editing comments.
Definition: save.php:6
get_entity(int $guid)
Loads and returns an entity object from a guid.
Definition: entities.php:67
$entity
Definition: save.php:17

Definition at line 31 of file save.php.