mirror of
https://github.com/silverstripe/silverstripe-docsviewer
synced 2024-10-22 11:05:56 +02:00
2c00a3b20f
Clean up of existing theme, implementation of a new easier to integrate layout.
43 lines
899 B
PHP
43 lines
899 B
PHP
<?php
|
|
|
|
/**
|
|
* Collection of static helper methods for managing the documentation
|
|
*
|
|
* @package docsviewer
|
|
*/
|
|
class DocumentationHelper {
|
|
|
|
/**
|
|
* Generate an array of every single documentation page installed on the
|
|
* system.
|
|
*
|
|
* @return ArrayList
|
|
*/
|
|
public static function get_all_documentation_pages() {
|
|
DocumentationService::load_automatic_registration();
|
|
|
|
$modules = DocumentationService::get_registered_entities();
|
|
$output = new ArrayList();
|
|
|
|
if($modules) {
|
|
foreach($modules as $module) {
|
|
foreach($module->getVersions() as $version) {
|
|
try {
|
|
$pages = DocumentationService::get_pages_from_folder($module, false, true, $version);
|
|
|
|
if($pages) {
|
|
foreach($pages as $page) {
|
|
$output->push($page);
|
|
}
|
|
}
|
|
}
|
|
catch(Exception $e) {
|
|
user_error($e, E_USER_WARNING);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
return $output;
|
|
}
|
|
} |