Checks if the types of the passed arguments in a function/method call are compatible.
1 | <?php |
||
2 | /** |
||
3 | * Elgg ajax edit comment form |
||
4 | * |
||
5 | * @package Elgg |
||
6 | * @subpackage Core |
||
7 | */ |
||
8 | |||
9 | $guid = get_input('guid'); |
||
10 | |||
11 | $comment = get_entity($guid); |
||
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
12 | $entity = $comment->getContainerEntity(); |
||
13 | elgg_set_page_owner_guid($entity->getContainerGUID()); |
||
14 | |||
15 | if (!($comment instanceof ElggComment) || !$comment->canEdit()) { |
||
16 | return false; |
||
17 | } |
||
18 | |||
19 | $form_vars = [ |
||
20 | 'class' => 'hidden mvl', |
||
21 | 'id' => "edit-comment-{$guid}", |
||
22 | ]; |
||
23 | $body_vars = [ |
||
24 | 'comment' => $comment, |
||
25 | ]; |
||
26 | echo elgg_view_form('comment/save', $form_vars, $body_vars); |
||
27 |