Elgg
Version 1.9
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
views
default
core
ajax
edit_comment.php
Go to the documentation of this file.
1
<?php
9
$guid
=
get_input
(
'guid'
);
10
11
$comment
=
get_entity
(
$guid
);
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
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
elgg_set_page_owner_guid($guid)
Set the guid of the entity that owns this page.
Definition:
pageowner.php:73
$entity
$entity
Definition:
edit_comment.php:12
elgg_instanceof
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
$comment
Definition:
edit_comment.php:11
echo
elgg echo
Translates a string.
Definition:
languages.js:43
$body_vars
$body_vars
Definition:
edit_comment.php:23
$form_vars
if(!elgg_instanceof($comment, 'object', 'comment')||!$comment->canEdit()) $form_vars
Definition:
edit_comment.php:19
$guid
$guid
Definition:
edit_comment.php:9
elgg_view_form
elgg_view_form($action, $form_vars=array(), $body_vars=array())
Definition:
views.php:1280
get_entity
get_entity($guid)
Loads and returns an entity object from a guid.
Definition:
entities.php:604
Generated on Sat Sep 7 2024 00:00:34 for Elgg by
1.8.11