Elgg  Version master
edit_comment.php
Go to the documentation of this file.
1 <?php
6 $guid = (int) get_input('guid');
7 
9 if (!$comment instanceof ElggComment || !$comment->canEdit()) {
10  return false;
11 }
12 
13 $entity = $comment->getContainerEntity();
15 
17  'class' => 'hidden mvl',
18  'id' => "edit-comment-{$guid}",
19 ];
21  'comment' => $comment,
22 ];
23 echo elgg_view_form('comment/save', $form_vars, $body_vars);
elgg_view_form(string $action, array $form_vars=[], array $body_vars=[])
Definition: views.php:1033
getContainerGUID()
Gets the container GUID for this entity.
Definition: ElggEntity.php:542
elgg_set_page_owner_guid(int $guid)
Set the guid of the entity that owns this page.
Definition: pageowner.php:34
get_input(string $variable, $default=null, bool $filter_result=true)
Parameter input functions.
Definition: input.php:20
if(!$comment instanceof ElggComment||!$comment->canEdit()) $entity
$form_vars
get_entity(int $guid)
Loads and returns an entity object from a guid.
Definition: entities.php:70
$comment
Definition: edit_comment.php:8
$body_vars
$guid
Elgg ajax edit comment form.
Definition: edit_comment.php:6