Checks if the types of the passed arguments in a function/method call are compatible.
1 | <?php |
||
2 | |||
3 | $page_type = elgg_extract('page_type', $vars); |
||
4 | $guid = elgg_extract('guid', $vars); |
||
5 | |||
6 | elgg_entity_gatekeeper($guid, 'object', 'blog'); |
||
7 | elgg_group_gatekeeper(); |
||
8 | |||
9 | $blog = get_entity($guid); |
||
10 | |||
11 | elgg_set_page_owner_guid($blog->container_guid); |
||
12 | |||
13 | // no header or tabs for viewing an individual blog |
||
14 | $params = [ |
||
15 | 'filter' => '', |
||
16 | 'title' => $blog->title |
||
17 | ]; |
||
18 | |||
19 | $container = $blog->getContainerEntity(); |
||
20 | $crumbs_title = $container->name; |
||
21 | |||
22 | if ($container instanceof ElggGroup) { |
||
23 | elgg_push_breadcrumb($crumbs_title, elgg_generate_url('collection:object:blog:group', ['group_guid' => $container->guid])); |
||
24 | } else { |
||
25 | elgg_push_breadcrumb($crumbs_title, elgg_generate_url('collection:object:blog:owner', ['username' => $container->username])); |
||
26 | } |
||
27 | |||
28 | elgg_push_breadcrumb($blog->title); |
||
29 | |||
30 | $params['content'] = elgg_view_entity($blog); |
||
31 | |||
32 | $params['sidebar'] = elgg_view('blog/sidebar', ['page' => $page_type]); |
||
33 | |||
34 | $body = elgg_view_layout('content', $params); |
||
35 | |||
36 | echo elgg_view_page($params['title'], $body); |
||
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
37 |