RefreshAssetManifestCommand
class RefreshAssetManifestCommand extends AssetManifestCommandBase
Updates (or Creates) the manifest.json file for the assets versioning.
This command allows to update the manifest.json file after the update of an asset.
Run this command when an asset(css, js, images, ...) is modified.
Properties
protected string | $name | from CommandBase | |
protected string | $version | from CommandBase | |
protected array|false | $parameters | from CommandBase | |
protected string | $projectDir | from CommandBase | |
protected string | $publicDir | from CommandBase | |
protected Translator | $translator | from CommandBase | |
protected bool | $initialized | from CommandBase | |
protected bool | $html | from CommandBase | |
protected array|null | $manifest | from AssetManifestCommandBase | |
private array|null | $oldmanifest |
Methods
No description
This function parses the '.env' file and returns an array of parameters
initializes the current command.
Asks an argument if it's not supplied in the command line.
No description
Run an embedded console command.
Retuns the DOMElement at position $index of the DOMNodeList
Converts a relative path of a file to an absolute path
Finds files in the subdirectories of a giving directory
Finds the assets directory
Finds the templates directory
Finds the pdf forms directory
Finds the simulators directory
Displays an message
Displays an info message
Displays a warning message
Displays a success message
Displays a failure message
Displays an fatal error message
Displays an error message
Displays a debug message
Displays a comment
No description
No description
No description
No description
No description
No description
No description
Try to add a file to the manifest.
Adds version number to path
Increments version of an asset
Details
at line 53
__construct(string $projectDir)
in CommandBase at line 111
private void
doInitialization()
Realizes the initialization this command
in CommandBase at line 136
private array|false
getParameters()
This function parses the '.env' file and returns an array of parameters
in CommandBase at line 169
private string
getParameterValue(string $parameter)
Returns the value of a parameter
in CommandBase at line 184
protected string
getConfigParameter(string $parameter)
Gets a parameter with its name.
in CommandBase at line 194
protected void
configure()
Configures the current command.
in CommandBase at line 228
protected void
initialize(InputInterface $input, OutputInterface $output)
initializes the current command.
in CommandBase at line 259
protected void
askArgument(InputInterface $input, OutputInterface $output, string $argumentName, string $questionText)
Asks an argument if it's not supplied in the command line.
at line 104
protected int|null
execute(InputInterface $input, OutputInterface $output)
in CommandBase at line 307
protected bool
runEmbeddedCommand(array $command, InputInterface $input, OutputInterface $output)
Run an embedded console command.
in CommandBase at line 325
protected DOMElement|null
castDOMElement(DOMNode $node)
Casts a DOMNode to DOMElement
in CommandBase at line 341
protected DOMElement|null
getDOMElementItem(DOMNodeList $nodes, int $index)
Retuns the DOMElement at position $index of the DOMNodeList
in CommandBase at line 357
protected string
resolvePath(string $path, string $base)
Converts a relative path of a file to an absolute path
in CommandBase at line 385
protected array
findFile(string $in, string $name, InputInterface $input, OutputInterface $output, array $filters = [])
Finds files in the subdirectories of a giving directory
in CommandBase at line 438
protected string|int
findAssetsDirectory(string $in, InputInterface $input, OutputInterface $output)
Finds the assets directory
in CommandBase at line 482
protected string|int
findTemplatesDirectory(string $in, InputInterface $input, OutputInterface $output)
Finds the templates directory
in CommandBase at line 526
protected string|int
findPDFFormsDirectory(string $in, InputInterface $input, OutputInterface $output)
Finds the pdf forms directory
in CommandBase at line 570
protected string|int
findSimulatorsDirectory(string $in, InputInterface $input, OutputInterface $output)
Finds the simulators directory
in CommandBase at line 611
protected bool
isHtml()
Returns true, if the message are displayed in HTML, false if not.
in CommandBase at line 627
private void
message(OutputInterface $output, string $message, array $parameters = [], string $start = 'info', string $end = 'info', int $verbosity = OutputInterface::VERBOSITY_NORMAL)
Displays an message
in CommandBase at line 647
protected void
info(OutputInterface $output, string $message, array $parameters = [])
Displays an info message
in CommandBase at line 664
protected void
warning(OutputInterface $output, string $message, array $parameters = [])
Displays a warning message
in CommandBase at line 681
protected void
success(OutputInterface $output, string $message, array $parameters = [])
Displays a success message
in CommandBase at line 698
protected void
failure(OutputInterface $output, string $message, array $parameters = [])
Displays a failure message
in CommandBase at line 715
protected void
fatal(OutputInterface $output, string $message, array $parameters = [])
Displays an fatal error message
in CommandBase at line 732
protected void
error(OutputInterface $output, string $message, array $parameters = [])
Displays an error message
in CommandBase at line 749
protected void
debug(OutputInterface $output, string $message, array $parameters = [])
Displays a debug message
in CommandBase at line 762
protected void
comment(OutputInterface $output, string $message, array $parameters = [])
Displays a comment
at line 65
protected string
getCommandName()
at line 72
protected string
getCommandDescription()
at line 79
protected string
getCommandHelp()
at line 90
protected array
getCommandArguments()
at line 97
protected array
getCommandOptions()
at line 145
protected bool
addFile(string $file, OutputInterface $output)
at line 169
protected bool
processFile(string $file, OutputInterface $output)
in AssetManifestCommandBase at line 114
protected bool
tryToAddFile(string $file, OutputInterface $output)
Try to add a file to the manifest.
in AssetManifestCommandBase at line 177
protected string
versionize(string $path, string $version)
Adds version number to path
in AssetManifestCommandBase at line 193
protected string
incrementVersion(string $version)
Increments version of an asset