Elgg  Version 6.2
Variables
details.php File Reference

Go to the source code of this file.

Variables

 $guid = (int) get_input('guid')
 
 $plugin = get_entity($guid)
 
if(! $plugin instanceof ElggPlugin||! $plugin->canEdit()) $show_dependencies_first = !$plugin->meetsDependencies()
 
 $info = []
 
 $info [elgg_echo('admin:plugins:label:version')] = htmlspecialchars($plugin->getVersion())
 
 $info [elgg_echo('admin:plugins:label:id')]
 
 $authors = $plugin->getAuthors()
 
if(!empty($authors)) $url = $plugin->getWebsite()
 
if(!empty($url)) $info [elgg_echo('admin:plugins:label:licence')]
 
 $site_path = elgg_get_root_path()
 
 $path = $plugin->getPath()
 
if(str_starts_with($path, $site_path)) $info [elgg_echo('admin:plugins:label:location')] = htmlspecialchars($path)
 
 $categories = array_values($plugin->getCategories())
 
 $info [elgg_echo('admin:plugins:label:categories')] = implode(', ', $categories)
 
 $rows = ''
 
foreach($info as $name=> $value$info_html = elgg_format_element('table', ['class' => 'elgg-table'], $rows)
 
if(elgg_language_key_exists("admin:plugins:info:{$plugin->getID()}")) $resources
 
 $resources_html = ''
 
foreach($resources as $id=> $href) if(!empty($resources_html)) $files_html = ''
 
foreach(\ElggPlugin::ADDITIONAL_TEXT_FILES as $file) if(!empty($files_html)) $body = "<div class='elgg-plugin'>"
 
 $tabs
 
if(!empty($resources_html)) if(!empty($files_html)) $dependencies_html = elgg_view('object/plugin/elements/dependencies', ['plugin' => $plugin])
 

Variable Documentation

◆ $authors

$authors = $plugin->getAuthors()

Definition at line 21 of file details.php.

◆ $body

$body = "<div class='elgg-plugin'>"

Definition at line 139 of file details.php.

◆ $categories

$categories = array_values($plugin->getCategories())

Definition at line 77 of file details.php.

◆ $dependencies_html

if (!empty( $resources_html)) if (!empty( $files_html)) $dependencies_html = elgg_view('object/plugin/elements/dependencies', ['plugin' => $plugin])

Definition at line 168 of file details.php.

◆ $files_html

foreach ( $resources as $id=> $href) if (!empty( $resources_html)) $files_html = ''

Definition at line 117 of file details.php.

◆ $guid

$guid = (int) get_input('guid')

Definition at line 3 of file details.php.

◆ $info [1/6]

$info = []

Definition at line 13 of file details.php.

◆ $info [2/6]

$info[elgg_echo( 'admin:plugins:label:categories')] = implode(', ', $categories)

Definition at line 78 of file details.php.

◆ $info [3/6]

$info[elgg_echo( 'admin:plugins:label:id')]
Initial value:
= elgg_view('output/text', [
'value' => $plugin->getID(),
])
elgg_view(string $view, array $vars=[], string $viewtype='')
Return a parsed view.
Definition: views.php:156
$plugin
Definition: details.php:5

Definition at line 17 of file details.php.

◆ $info [4/6]

if (!empty( $url)) $info[elgg_echo( 'admin:plugins:label:licence')]
Initial value:
= elgg_view('output/text', [
'value' => $plugin->getLicense(),
])

Definition at line 65 of file details.php.

◆ $info [5/6]

if (str_starts_with( $path, $site_path)) $info[elgg_echo( 'admin:plugins:label:location')] = htmlspecialchars($path)

Definition at line 75 of file details.php.

◆ $info [6/6]

$info[elgg_echo( 'admin:plugins:label:version')] = htmlspecialchars($plugin->getVersion())

Definition at line 15 of file details.php.

◆ $info_html

foreach ( $info as $name=> $value) $info_html = elgg_format_element('table', ['class' => 'elgg-table'], $rows)

Definition at line 90 of file details.php.

◆ $path

$path = $plugin->getPath()
Examples
/root/Elgg/engine/classes/Elgg/Http/Urls.php.

Definition at line 70 of file details.php.

◆ $plugin

$plugin = get_entity($guid)

Definition at line 5 of file details.php.

◆ $resources

if (elgg_language_key_exists("admin:plugins:info:{$plugin->getID()}")) $resources
Initial value:
= [
'repository' => $plugin->getRepositoryURL(),
'bugtracker' => $plugin->getBugTrackerURL(),
]

Definition at line 96 of file details.php.

◆ $resources_html

$resources_html = ''

Definition at line 101 of file details.php.

◆ $rows

$rows = ''

Definition at line 81 of file details.php.

◆ $show_dependencies_first

if (! $plugin instanceof ElggPlugin||! $plugin->canEdit()) $show_dependencies_first = !$plugin->meetsDependencies()

Definition at line 10 of file details.php.

◆ $site_path

$site_path = elgg_get_root_path()

Definition at line 69 of file details.php.

◆ $tabs

$tabs
Initial value:
= [
'elgg-plugin-details-info' => [
'text' => elgg_echo('admin:plugins:label:info'),
'selected' => !$show_dependencies_first,
'content' => $info_html,
],
]
elgg_echo(string $message_key, array $args=[], string $language='')
Elgg language module Functions to manage language and translations.
Definition: languages.php:17
foreach($info as $name=> $value) $info_html
Definition: details.php:90
if(! $plugin instanceof ElggPlugin||! $plugin->canEdit()) $show_dependencies_first
Definition: details.php:10

Definition at line 146 of file details.php.

◆ $url

if (!empty( $authors)) $url = $plugin->getWebsite()

Definition at line 58 of file details.php.