*/ // must be run within Dokuwiki if(!defined('DOKU_INC')) die(); class admin_plugin_farmer_info extends DokuWiki_Admin_Plugin { /** * @return bool admin only! */ public function forAdminOnly() { return false; } /** * Should carry out any processing required by the plugin. */ public function handle() { } /** * Render HTML output, e.g. helpful text and a form */ public function html() { /** @var helper_plugin_farmer $helper */ $helper = plugin_load('helper', 'farmer'); $animal = $helper->getAnimal(); echo ''; $this->line('thisis', $animal ? $this->getLang('thisis.animal') : $this->getLang('thisis.farmer')); if($animal) { $this->line('animal', $animal); } echo '
'; echo ''; $this->line('baseinstall', DOKU_INC); $this->line('farm dir', DOKU_FARMDIR); $this->line('animals', count($helper->getAllAnimals())); echo '
'; } protected function line($langkey, $value) { echo ''; echo ''.$this->getLang($langkey).''; echo ''.$value.''; echo ''; } } // vim:ts=4:sw=4:et: