Checks if the types of the passed arguments in a function/method call are compatible.
1 | <?php |
||
2 | /** |
||
3 | * File river view. |
||
4 | */ |
||
5 | |||
6 | $item = elgg_extract('item', $vars); |
||
7 | if (!$item instanceof ElggRiverItem) { |
||
8 | return; |
||
9 | } |
||
10 | |||
11 | $object = $item->getObjectEntity(); |
||
12 | $vars['message'] = thewire_filter($object->description); |
||
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
13 | |||
14 | $subject = $item->getSubjectEntity(); |
||
15 | $subject_link = elgg_view('output/url', [ |
||
16 | 'href' => $subject->getURL(), |
||
17 | 'text' => $subject->name, |
||
18 | 'class' => 'elgg-river-subject', |
||
19 | 'is_trusted' => true, |
||
20 | ]); |
||
21 | |||
22 | $object_link = elgg_view('output/url', [ |
||
23 | 'href' => "thewire/owner/$subject->username", |
||
24 | 'text' => elgg_echo('thewire:wire'), |
||
25 | 'class' => 'elgg-river-object', |
||
26 | 'is_trusted' => true, |
||
27 | ]); |
||
28 | |||
29 | $vars['summary'] = elgg_echo('river:object:thewire:create', [$subject_link, $object_link]); |
||
30 | |||
31 | echo elgg_view('river/elements/layout', $vars); |
||
32 |