Elgg  Version 1.9
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"><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>';
$column
Definition: add.php:13
$columns
elgg_extract($key, array $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:1464
$plugin
if(isset($vars['id'])) $class
Definition: ajax_loader.php:19
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
_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:668
elgg echo
Translates a string.
Definition: languages.js:43
$type
Definition: add.php:8
$deps
$row
if(file_exists($welcome)) $vars
Definition: upgrade.php:93