/** * Prepare the options */ protected function _prepareOptions() { parent::_prepareOptions(); // Base params override $base_params = $this->getOptions()->get(Opt::BASE_PARAMS); $base_params['tmd_t'] = $this->getOptions()->get(Opt::TREE_CURRENT); $this->getOptions()->set(Opt::BASE_PARAMS, $base_params); }
<?php /** * Documentation index * * @author h.woltersdorf */ require_once __DIR__ . '/../vendor/autoload.php'; use hollodotme\TreeMDown\TreeMDown; $treemdown = new TreeMDown(__DIR__ . '/MilestonES'); $treemdown->setCompanyName('hollodotme'); $treemdown->setProjectName('MilestonES'); $treemdown->setShortDescription('Milestone enabled event store'); $treemdown->display();
<?php /** * Documentation page * * @author h.woltersdorf */ require_once __DIR__ . '/../vendor/autoload.php'; use hollodotme\TreeMDown\TreeMDown; $treemdown = new TreeMDown(__DIR__ . '/Types'); $treemdown->setProjectName('Types'); $treemdown->setShortDescription('PHP data types'); $treemdown->enablePrettyNames(); $treemdown->hideFilenameSuffix(); $treemdown->hideEmptyFolders(); $treemdown->display();
<?php /** * Example script for using TreeMDown * @author hollodotme */ // include composer autoloading require_once __DIR__ . '/../vendor/autoload.php'; use hollodotme\TreeMDown\TreeMDown; // Create instance $tmd = new TreeMDown('/path/to/your/markdown/files'); /** * Options section, comment out and change values to fit your needs */ # [Page meta data] # # Set a projectname #$tmd->setProjectName('Your project name'); # Set a short description #$tmd->setShortDescription('Your short description'); # Set a company name #$tmd->setCompanyName('Your company name'); # [Output options] # # Show or hide empty folders in tree # # Default: Empty folders will be displayed # #$tmd->showEmptyFolders(); #$tmd->hideEmptyFolders(); # Set the default file that is shown if no file or path is selected (initial state)