silverstripe-docsviewer/code/models/DocumentationFolder.php
2014-09-21 11:20:01 +12:00

23 lines
479 B
PHP

<?php
/**
* A specific documentation folder within a {@link DocumentationEntity}.
*
* Maps to a folder on the file system.
*
* @package docsviewer
* @subpackage model
*/
class DocumentationFolder extends DocumentationPage {
/**
* @return string
*/
public function getTitle() {
$path = explode(DIRECTORY_SEPARATOR, trim($this->getPath(), DIRECTORY_SEPARATOR));
$folderName = array_pop($path);
return DocumentationHelper::clean_page_name($folderName);
}
}