Elgg  Version 1.9
edit_comment.php
Go to the documentation of this file.
1 <?php
9 $guid = get_input('guid');
10 
12 $entity = $comment->getContainerEntity();
13 elgg_set_page_owner_guid($entity->getContainerGUID());
14 
15 if (!elgg_instanceof($comment, 'object', 'comment') || !$comment->canEdit()) {
16  return false;
17 }
18 
19 $form_vars = array(
20  'class' => 'hidden mvl',
21  'id' => "edit-comment-{$guid}",
22 );
23 $body_vars = array('comment' => $comment);
24 echo elgg_view_form('comment/save', $form_vars, $body_vars);
get_input($variable, $default=null, $filter_result=true)
Get some input from variables passed submitted through GET or POST.
Definition: input.php:27
elgg_set_page_owner_guid($guid)
Set the guid of the entity that owns this page.
Definition: pageowner.php:73
$entity
elgg_instanceof($entity, $type=null, $subtype=null, $class=null)
Checks if $entity is an ElggEntity and optionally for type and subtype.
Definition: entities.php:1886
$comment
elgg echo
Translates a string.
Definition: languages.js:43
$body_vars
if(!elgg_instanceof($comment, 'object', 'comment')||!$comment->canEdit()) $form_vars
$guid
Definition: edit_comment.php:9
elgg_view_form($action, $form_vars=array(), $body_vars=array())
Definition: views.php:1280
get_entity($guid)
Loads and returns an entity object from a guid.
Definition: entities.php:604