Elgg  Version 3.0
invalid.php
Go to the documentation of this file.
1 <?php
12 /* @var ElggPlugin $plugin */
13 $plugin = elgg_extract('entity', $vars);
14 
15 $plugin_id = $plugin->getID();
16 
17 $body = "<div class='elgg-plugin-title'>{$plugin_id}</div>";
18 
19 $error = elgg_echo('admin:plugins:warning:invalid', [$plugin->getError()]);
20 $error .= elgg_echo('admin:plugins:label:location') . ": " . htmlspecialchars($plugin->getPath());
21 
23  'class' => 'elgg-text-help elgg-state-error',
24 ], $error);
26  'class' => 'elgg-text-help',
27 ], elgg_echo('admin:plugins:warning:invalid:check_docs'));
28 
29 $body .= "<div>$message</div>";
30 
31 $result = elgg_view_image_block(elgg_echo('admin:plugins:cannot_activate'), $body);
33  'class' => 'elgg-state-draggable elgg-plugin elgg-state-inactive elgg-state-cannot-activate',
34  'id' => preg_replace('/[^a-z0-9-]/i', '-', $plugin_id),
35  'data-guid' => $plugin->guid,
36 ], $result);
elgg_echo($message_key, array $args=[], $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
$message
Definition: invalid.php:22
elgg_view_image_block($image, $body, $vars=[])
Wrapper function for the image block display pattern.
Definition: views.php:1177
$body
Definition: invalid.php:17
$plugin_id
Definition: invalid.php:15
$result
Definition: invalid.php:31
elgg_format_element($tag_name, array $attributes=[], $text= '', array $options=[])
Format an HTML element.
Definition: output.php:168
elgg echo
Translates a string.
Definition: languages.js:43
$plugin
Definition: invalid.php:13
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
$vars['type']
Definition: save.php:11
$error
Definition: invalid.php:19