Elgg  Version 2.2
 All Classes Namespaces Files Functions Variables Pages
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);
elgg_view_form($action, $form_vars=array(), $body_vars=array())
Definition: views.php:1302
elgg_set_page_owner_guid($guid)
Set the guid of the entity that owns this page.
Definition: pageowner.php:72
$entity
elgg_instanceof($entity, $type=null, $subtype=null, $class=null)
Checks if $entity is an and optionally for type and subtype.
Definition: entities.php:716
$comment
get_input($variable, $default=null, $filter_result=true)
Get some input from variables passed submitted through GET or POST.
Definition: input.php:27
$body_vars
if(!elgg_instanceof($comment, 'object', 'comment')||!$comment->canEdit()) $form_vars
$guid
Definition: edit_comment.php:9
get_entity($guid)
Loads and returns an entity object from a guid.
Definition: entities.php:204