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