streams/Code/Widget/Notes.php
2022-02-15 20:08:28 -08:00

31 lines
566 B
PHP

<?php
namespace Code\Widget;
use Code\Lib\Apps;
use Code\Render\Theme;
class Notes
{
public function widget($arr)
{
if (!local_channel()) {
return '';
}
if (!Apps::system_app_installed(local_channel(), 'Notes')) {
return '';
}
$text = get_pconfig(local_channel(), 'notes', 'text');
$o = replace_macros(Theme::get_template('notes.tpl'), [
'$banner' => t('Notes'),
'$text' => $text,
'$save' => t('Save'),
]);
return $o;
}
}