aboutsummaryrefslogblamecommitdiffstats
path: root/Zotlabs/Widget/Notes.php
blob: 238008d81840c52b45384785f1d261ad91644b66 (plain) (tree)
1
2
3
4
5
6
7
8
9
10



                         

                     



                                     



                                                                          


                                                                    


                                                        


                                                
                                                                       




                          
<?php

namespace Zotlabs\Widget;

use Zotlabs\Lib\Apps;

class Notes {

	function widget($arr) {
		if(! local_channel())
			return EMPTY_STR;

		if(! Apps::system_app_installed(local_channel(), 'Notes'))
			return EMPTY_STR;

		$text = get_pconfig(local_channel(),'notes','text');

		$tpl = get_markup_template('notes.tpl');

		$o = replace_macros($tpl, array(
			'$banner' => t('Notes'),
			'$text' => $text,
			'$save' => t('Save'),
			'$app' => ((isset($arr['app'])) ? true : false)
		));

		return $o;
	}
}