AssetCreate

abstract class System\Console\Asset\AssetCreate
extends Winter\Storm\Console\Command
implements 
    Symfony\Component\Console\Command\SignalableCommandInterface

Extends

Class Description
Command

Command base class Contains utilities to make developing CLI commands nicer

Traits

Trait Description
HandlesCleanup

Console Command Trait that injects cross-platform signal handling to trigger cleanup on exit through the handleCleanup() method on the implementing class.

ProvidesAutocompletion

Console Command Trait that injects cross-platform signal handling to trigger cleanup on exit through the handleCleanup() method on the implementing class.

Constants

Constant Description
TYPE_PLUGIN
string "plugin"
TYPE_THEME
string "theme"

Properties

protected $assetType : string

The type of compilable to configure

protected $configFile : string

The name of the config file

protected $description : string

The console command description.

private $fixturePath : string

Local cache of fixture path

inherited protected $laravel : Winter\Storm\Foundation\Application

Inherited from Command

inherited protected $replaces : array

Inherited from Command

List of commands that this command replaces (aliases)

Methods

public __construct ()

Dynamically generate options for all available bundles

Returns
mixed

public handle () : integer

Execute the console command.

Returns
integer

protected afterExecution () : void

Ran after configuration is complete, use for tearing down / reporting

Returns
void

protected getFixture (string $path) : string

Helper method for loading fixtures from the default library

Parameters
Property Description
$path
string
Returns
string

protected getPackagePathType (string $package) : array

Resolve the path and type of the package by name

Parameters
Property Description
$package
string
Returns
array

protected installConfigs (System\Classes\Asset\PackageJson $packageJson, string $packageName, string $packageType, string $packagePath) : void

Write out config files based on assetType and the requested options

Parameters
Property Description
$packageJson
System\Classes\Asset\PackageJson
$packageName
string
$packageType
string
$packagePath
string
Returns
void

protected makePackageName (string $package) : string

Converts the user supplied package name into a consistent internal format

Parameters
Property Description
$package
string
Returns
string

protected writeFile (string $path, string $content) : integer

Write a file but ask for conformation before overwriting

Parameters
Property Description
$path
string
$content
string
Returns
integer

inherited public alert (string $string, int | string | null $verbosity = null) : void

Inherited from Command

Write a string in an alert box.

Parameters
Property Description
$string
string
$verbosity
int | string | null
Returns
void

inherited public complete (Symfony\Component\Console\Completion\CompletionInput $input, Symfony\Component\Console\Completion\CompletionSuggestions $suggestions) : void

Provide autocompletion for this command's input

Parameters
Property Description
$input
Symfony\Component\Console\Completion\CompletionInput
$suggestions
Symfony\Component\Console\Completion\CompletionSuggestions
Returns
void

inherited public error (string $string, int | string | null $verbosity = null) : void

Inherited from Command

Write a string as error output.

Parameters
Property Description
$string
string
$verbosity
int | string | null
Returns
void

inherited public getSubscribedSignals () : array

Inherited from HandlesCleanup

Returns the process signals this command listens to

Returns
array

inherited public handleSignal (integer $signal) : void

Inherited from HandlesCleanup

Handle the provided Unix process signal

Parameters
Property Description
$signal
integer
Returns
void

inherited public handleWindowsSignal (integer $event) : void

Inherited from HandlesCleanup

Handle the provided Windows process singal.

Parameters
Property Description
$event
integer
Returns
void

Extended by

Class Description
MixCreate
ViteCreate
Copyright © 2024 Winter CMS