Elgg  Version 2.3
dependencies.php
Go to the documentation of this file.
1 <?php
11 $plugin = elgg_extract('plugin', $vars, false);
12 $deps = $plugin->getPackage()->checkDependencies(true);
13 
14 $columns = array('type', 'name', 'expected_value', 'local_value', 'comment');
15 
16 echo '<table class="elgg-plugin-dependencies styled elgg-table"><tr>';
17 
18 foreach ($columns as $column) {
19  $column = elgg_echo("admin:plugins:dependencies:$column");
20  echo "<th class=\"pas\">$column</th>";
21 }
22 
23 echo '</tr>';
24 
25 $row = 'odd';
26 foreach ($deps as $dep) {
28  $type = $dep['type'];
29 
30  if ($dep['status']) {
31  $class = "elgg-state-success elgg-dependency elgg-dependency-$type";
32  } elseif ($dep['type'] == 'suggests') {
33  $class = "elgg-state-warning elgg-dependency elgg-dependency-$type";
34  } else {
35  $class = "elgg-state-error elgg-dependency elgg-dependency-$type";
36  }
37 
38  echo "<tr class=\"$row\">";
39 
40  foreach ($columns as $column) {
41  echo "<td class=\"pas $class\">{$fields[$column]}</td>";
42  }
43 
44  echo '</tr>';
45 
46  $row = ($row == 'odd') ? 'even' : 'odd';
47 }
48 
49 echo '</table>';
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
$fields
Definition: register.php:26
$column
Definition: add.php:13
$class
Definition: field.php:20
$columns
$plugin
$vars['entity']
_elgg_get_plugin_dependency_strings($dep)
Returns an array of parsed strings for a dependency in the format: array( &#39;type&#39; => requires...
Definition: plugins.php:201
elgg echo
Translates a string.
Definition: languages.js:48
$deps
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:1375
$row
if(!$display_name) $type
Definition: delete.php:27