Elgg  Version 2.2
 All Classes Namespaces Files Functions Variables Pages
plugin_settings.php
Go to the documentation of this file.
1 <?php
11 $plugin = $vars['plugin'];
12 $plugin_id = $plugin->getID();
13 
14 // required for plugin settings backward compatibility
15 $vars['entity'] = $plugin;
16 
17 $settings = false;
18 
19 if (elgg_view_exists("settings/$plugin_id/edit") || elgg_view_exists("plugins/$plugin_id/settings")) {
20  $title = $plugin->getManifest()->getName();
21 
22  $params = array('id' => "$plugin_id-settings", 'class' => 'elgg-form-settings');
23  $body = elgg_view_form("plugins/settings/save", $params, $vars);
24 
25  echo elgg_view_module('info', $title, $body);
26 }
elgg_view_exists($view, $viewtype= '', $recurse=true)
Returns whether the specified view exists.
Definition: views.php:299
elgg_view_form($action, $form_vars=array(), $body_vars=array())
Definition: views.php:1302
$vars['entity']
$title
Definition: save.php:22
$params
Definition: login.php:72
elgg_view_module($type, $title, $body, array $vars=array())
Wrapper function for the module display pattern.
Definition: views.php:1207
$plugin_id
$settings