API Documentation

CreatesNewPageSourceFile
in package
uses InteractsWithDirectories

Scaffold a new Markdown, Blade, or documentation page.

Table of Contents

Properties

$customContent  : string|null
$filename  : string
$force  : bool
$outputPath  : string
$pageClass  : HydePage>
$subDir  : string
$title  : string

Methods

__construct()  : mixed
save()  : string
createBladeFile()  : void
createDocumentationFile()  : void
createMarkdownFile()  : void
failIfFileCannotBeSaved()  : void
fileName()  : string
formatIdentifier()  : string
getBladePageContent()  : string
getMarkdownPageContent()  : string
makeOutputPath()  : string
needsDirectories()  : void
Ensure the supplied directories exist by creating them if they don't.
needsDirectory()  : void
Ensure the supplied directory exist by creating it if it does not.
needsParentDirectory()  : void
Ensure the supplied file's parent directory exists by creating it if it does not.
normalizeSubdirectory()  : string
parseTitle()  : string
validateType()  : void

Properties

Methods

__construct()

public __construct(string $title[, string $pageClass = MarkdownPage::class ][, bool $force = false ][, string|null $customContent = null ]) : mixed
Parameters
$title : string
$pageClass : string = MarkdownPage::class
$force : bool = false
$customContent : string|null = null

failIfFileCannotBeSaved()

protected failIfFileCannotBeSaved(string $path) : void
Parameters
$path : string

makeOutputPath()

protected makeOutputPath(HydePage> $pageClass) : string
Parameters
$pageClass : HydePage>
Return values
string

needsDirectories()

Ensure the supplied directories exist by creating them if they don't.

protected static needsDirectories(array<string|int, string> $directories) : void
Parameters
$directories : array<string|int, string>

array with relative file paths to the directories

needsDirectory()

Ensure the supplied directory exist by creating it if it does not.

protected static needsDirectory(string $directory) : void
Parameters
$directory : string

relative file path to the directory

needsParentDirectory()

Ensure the supplied file's parent directory exists by creating it if it does not.

protected static needsParentDirectory(string $file[, int $levels = 1 ]) : void
Parameters
$file : string
$levels : int = 1

normalizeSubdirectory()

protected normalizeSubdirectory(string $title) : string
Parameters
$title : string
Return values
string

parseTitle()

protected parseTitle(string $title) : string
Parameters
$title : string
Return values
string

        
On this page

Search results