31 $can_activate =
false;
32 $can_deactivate =
$plugin->canDeactivate();
34 $can_deactivate =
false;
35 $can_activate =
$plugin->canActivate();
44 'priority' =>
'first',
91 'href' => $bottom_url,
99 $links =
'<ul class="elgg-menu elgg-plugin-list-reordering">' .
$links .
'</ul>';
102 $classes[] =
'elgg-state-undraggable';
109 'is_trusted' =>
true,
116 if ($can_deactivate) {
118 $options[
'class'] =
'elgg-button elgg-button-cancel elgg-plugin-state-change';
120 $classes[] =
'elgg-state-cannot-deactivate';
122 $options[
'class'] =
'elgg-button elgg-button-cancel elgg-state-disabled';
125 }
else if ($can_activate) {
129 $options[
'class'] =
'elgg-button elgg-button-submit elgg-plugin-state-change';
132 $classes[] =
'elgg-state-inactive elgg-state-cannot-activate';
134 $options[
'class'] =
'elgg-button elgg-button-submit elgg-state-disabled';
141 'plugin_guids[]' =>
$plugin->guid
160 $css_class = preg_replace(
'/[^a-z0-9-]/i',
'-', $category);
161 $classes[] =
"elgg-plugin-category-$css_class";
165 'href' =>
"ajax/view/object/plugin/details?guid={$plugin->getGUID()}",
166 'text' =>
$plugin->getDisplayName(),
167 'class' =>
'elgg-lightbox elgg-plugin-title',
172 'href' =>
"admin/plugin_settings/{$plugin_id}",
175 'class' =>
'elgg-plugin-settings',
181 'class' =>
'elgg-plugin-list-description',
187 'class' =>
$active ?
'elgg-text-help' :
'elgg-text-help elgg-state-error',
190 $body .=
"<div>$message</div>";
196 'id' => preg_replace(
'/[^a-z0-9-]/i',
'-',
$plugin_id),
if($action) $action_button
elgg_http_add_url_query_elements($url, array $elements)
Sets elements in a URL's query string.
elgg_view_exists($view, $viewtype= '', $recurse=true)
Returns whether the specified view exists.
if(!in_array('bundled', $categories)) foreach($categories as $category) $body
elgg_echo($message_key, array $args=[], $language="")
Given a message key, returns an appropriately translated full-text string.
elgg_view_image_block($image, $body, $vars=[])
Wrapper function for the image block display pattern.
elgg_format_element($tag_name, array $attributes=[], $text= '', array $options=[])
Format an HTML element.
elgg echo
Translates a string.
elgg_trigger_plugin_hook($hook, $type, $params=null, $returnvalue=null)
_elgg_get_max_plugin_priority()
Returns the highest priority of the plugins.
elgg_extract($key, $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
elgg_view_icon($name, $vars=[])
View an icon glyph.
if(elgg_view_exists("plugins/{$plugin_id}/settings")) $description
elgg_view($view, $vars=[], $viewtype= '')
Return a parsed view.