Elgg  Version 3.0
Variables
plugin_text_file.php File Reference

Go to the source code of this file.

Variables

 $plugin_id = elgg_extract('plugin_id', $vars)
 
 $plugin = elgg_get_plugin_from_id($plugin_id)
 
 $filename = elgg_extract('filename', $vars)
 
 $error = false
 
if(!$plugin) $text_files = $plugin->getAvailableTextFiles()
 
if(!array_key_exists($filename, $text_files)) $file = $text_files[$filename]
 
 $file_contents = file_get_contents($file)
 
if(!$file_contents) if($error$title = $plugin->getDisplayName() . ": $filename"
 
 $text = MarkdownExtra::defaultTransform($file_contents)
 
 $body
 

Variable Documentation

$body
Initial value:
= elgg_view_layout('admin', [
'content' => '<div class="elgg-markdown">' . $text . '</div>',
'title' => $title
])
if(!$file_contents) if($error) $title
elgg_view_layout($layout_name, $vars=[])
Displays a layout with optional parameters.
Definition: views.php:593

Definition at line 48 of file plugin_text_file.php.

$error = false

Definition at line 15 of file plugin_text_file.php.

if (!array_key_exists($filename, $text_files)) $file = $text_files[$filename]

Definition at line 29 of file plugin_text_file.php.

$file_contents = file_get_contents($file)

Definition at line 30 of file plugin_text_file.php.

$filename = elgg_extract('filename', $vars)

Definition at line 8 of file plugin_text_file.php.

$plugin = elgg_get_plugin_from_id($plugin_id)

Definition at line 6 of file plugin_text_file.php.

$plugin_id = elgg_extract('plugin_id', $vars)

Definition at line 5 of file plugin_text_file.php.

$text = MarkdownExtra::defaultTransform($file_contents)

Definition at line 46 of file plugin_text_file.php.

if (!$plugin) $text_files = $plugin->getAvailableTextFiles()

Definition at line 23 of file plugin_text_file.php.

if (!$file_contents) if ($error) $title = $plugin->getDisplayName() . ": $filename"

Definition at line 43 of file plugin_text_file.php.