API Documentation

BuildTaskService
in package

This service manages the build tasks that are called before and after the site is compiled using the build command.

The class is registered as a singleton in the Laravel service container and is run by the build command. Build Tasks can be registered programmatically, through the config, and through autodiscovery. The service determines when to run a task depending on which class it extends.

Table of Contents

Properties

$buildTasks  : array<string, BuildTask>
$output  : OutputStyle|null

Methods

__construct()  : mixed
getRegisteredTasks()  : array<string|int, PreBuildTask>|PostBuildTask>>
registerTask()  : void
runPostBuildTasks()  : void
runPreBuildTasks()  : void
setOutput()  : void
findTasksInAppDirectory()  : array<string|int, PreBuildTask>|PostBuildTask>>
findTasksInConfig()  : array<string|int, PreBuildTask>|PostBuildTask>>
makeTaskIdentifier()  : string
pathToClassName()  : string
registerIf()  : void
registerTaskInService()  : void
registerTasks()  : void
canCleanSiteDirectory()  : bool
canGenerateFeed()  : bool
canGenerateManifest()  : bool
canGenerateSearch()  : bool
canGenerateSitemap()  : bool
registerFrameworkTasks()  : void

Properties

Methods

getRegisteredTasks()

public getRegisteredTasks() : array<string|int, PreBuildTask>|PostBuildTask>>
Return values
array<string|int, PreBuildTask>|PostBuildTask>>

setOutput()

public setOutput(OutputStyle|null $output) : void
Parameters
$output : OutputStyle|null

findTasksInAppDirectory()

protected findTasksInAppDirectory() : array<string|int, PreBuildTask>|PostBuildTask>>
Return values
array<string|int, PreBuildTask>|PostBuildTask>>

findTasksInConfig()

protected findTasksInConfig() : array<string|int, PreBuildTask>|PostBuildTask>>
Return values
array<string|int, PreBuildTask>|PostBuildTask>>

pathToClassName()

protected static pathToClassName(string $file) : string
Parameters
$file : string
Return values
string

registerIf()

protected registerIf(string $task, bool $condition) : void
Parameters
$task : string
$condition : bool

registerTasks()

protected registerTasks(array<string|int, mixed> $tasks) : void
Parameters
$tasks : array<string|int, mixed>

canCleanSiteDirectory()

private canCleanSiteDirectory() : bool
Return values
bool

canGenerateManifest()

private canGenerateManifest() : bool
Return values
bool

canGenerateSearch()

private canGenerateSearch() : bool
Return values
bool

canGenerateSitemap()

private canGenerateSitemap() : bool
Return values
bool

        
On this page

Search results