/** * Render documentation for this component * * @param array $doc_dirs Directory paths under which to search for doc page file */ public final function render_documentation($doc_dirs) { // get doc setting $documentation = $this->component->property('documentation'); // is documentation set? if ($documentation) { // boolean value? if (is_numeric($documentation)) { // use auto naming? if ((bool) $documentation == true) { // yes, page is component name $page = $this->policy()->get_handle() . '/' . $this->component->property('name'); } else { // no, documentation disabled return; } } else { // page name was set manually $page = $documentation; } // new easy doc object $doc = new ICE_Docs($doc_dirs, $page); // publish it! $doc->publish(); } }
/** * Publish a developer (core) document page * * @package Infinity * @subpackage dashboard * @param string $page Name of page to publish */ function infinity_dashboard_devdoc_publish($page = null) { ICE_Loader::load('utils/docs'); $doc = new ICE_Docs(INFINITY_ADMIN_DOCS_PATH, $page); $doc->set_pre_filter('infinity_dashboard_doc_filter'); $doc->publish(); }