Elgg  Version 3.0
plugin.php
Go to the documentation of this file.
1 <?php
10 $plugin = elgg_extract('entity', $vars);
11 if (!($plugin instanceof \ElggPlugin)) {
12  return;
13 }
14 
15 if (!elgg_in_context('admin')) {
16  echo elgg_view('object/default', $vars);
17  return;
18 }
19 if (!$plugin->isValid()) {
20  echo elgg_view('object/plugin/invalid', $vars);
21  return;
22 }
23 
24 echo elgg_view('object/plugin/full', $vars);
elgg_in_context($context)
Check if this context exists anywhere in the stack.
Definition: pageowner.php:238
elgg echo
Translates a string.
Definition: languages.js:43
elgg_extract($key, $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:1131
$plugin
Definition: plugin.php:10
$vars['type']
Definition: save.php:11
elgg_view($view, $vars=[], $viewtype= '')
Return a parsed view.
Definition: views.php:246