Elgg  Version master
invalid.php
Go to the documentation of this file.
1 <?php
10 /* @var ElggPlugin $plugin */
11 $plugin = elgg_extract('entity', $vars);
12 
13 $error = elgg_echo('admin:plugins:warning:invalid', [elgg_extract('error', $vars)]);
14 $error .= ' ' . elgg_echo('admin:plugins:label:location') . ': ' . htmlspecialchars($plugin->getPath());
15 
16 $body = elgg_view_message('error', $error, ['title' => false, 'class' => 'elgg-subtext']);
17 $body .= elgg_view_message('notice', elgg_echo('admin:plugins:warning:invalid:check_docs'), ['title' => false, 'class' => 'elgg-subtext']);
18 
19 echo elgg_view('object/elements/summary', [
20  'entity' => $plugin,
21  'class' => 'elgg-state-draggable elgg-plugin elgg-state-inactive elgg-state-cannot-activate',
22  'id' => preg_replace('/[^a-z0-9-]/i', '-', $plugin->getID()),
23  'data-guid' => $plugin->guid,
24  'icon' => elgg_echo('admin:plugins:cannot_activate'),
25  'title' => $plugin->getID(),
26  'subtitle' => false,
27  'content' => $body,
28 ]);
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
Definition: languages.php:17
elgg_extract($key, $array, $default=null, bool $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:254
$body
Definition: invalid.php:16
elgg_view(string $view, array $vars=[], string $viewtype= '')
Return a parsed view.
Definition: views.php:156
$plugin
Displays an invalid plugin on the admin screen.
Definition: invalid.php:11
$vars
Definition: theme.php:5
elgg_view_message(string $type, string $body, array $vars=[])
Wrapper function for the message display pattern.
Definition: views.php:940
$error
Definition: invalid.php:13