Elgg
Version 2.3
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
);
elgg_view_form
elgg_view_form($action, $form_vars=array(), $body_vars=array())
Definition:
views.php:1345
elgg_set_page_owner_guid
elgg_set_page_owner_guid($guid)
Set the guid of the entity that owns this page.
Definition:
pageowner.php:72
$entity
$entity
Definition:
edit_comment.php:12
elgg_instanceof
elgg_instanceof($entity, $type=null, $subtype=null, $class=null)
Checks if $entity is an and optionally for type and subtype.
Definition:
entities.php:736
$comment
$comment
Definition:
edit_comment.php:11
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
echo
elgg echo
Translates a string.
Definition:
languages.js:48
$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
get_entity
get_entity($guid)
Loads and returns an entity object from a guid.
Definition:
entities.php:204
Generated on Sun Nov 3 2024 00:02:04 for Elgg by
1.8.11