Elgg
Version 6.1
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
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
elgg_view_form
elgg_view_form(string $action, array $form_vars=[], array $body_vars=[])
Definition:
views.php:1033
ElggEntity\getContainerGUID
getContainerGUID()
Gets the container GUID for this entity.
Definition:
ElggEntity.php:542
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
get_input
get_input(string $variable, $default=null, bool $filter_result=true)
Parameter input functions.
Definition:
input.php:20
$entity
if(!$comment instanceof ElggComment||!$comment->canEdit()) $entity
Definition:
edit_comment.php:13
$form_vars
$form_vars
Definition:
edit_comment.php:16
get_entity
get_entity(int $guid)
Loads and returns an entity object from a guid.
Definition:
entities.php:70
$comment
$comment
Definition:
edit_comment.php:8
$body_vars
$body_vars
Definition:
edit_comment.php:20
$guid
$guid
Elgg ajax edit comment form.
Definition:
edit_comment.php:6
Generated on Wed Dec 4 2024 00:00:22 for Elgg by
1.8.11