final class MkCommands extends Command (View source)

Traits

A copy of \Drupal\Core\DependencyInjection\AutowireTrait with first params' type hint changed.

Constants

NAME

Methods

static AutowireTrait
create(ContainerInterface $container)

Instantiates a new instance of the implementing class using autowiring.

__construct(BootstrapManager $bootstrapManager, LoggerInterface $logger)

No description

int
execute(InputInterface $input, OutputInterface $output)

No description

array
createAnnotatedCommands(Application $application_generate, Application $application_drush)

Convert generators into Annotated commands (for Help).

static string
appendPostAmble()

No description

static string
appendAliases($command)

No description

static string
appendTopics(AnnotatedCommand $command, string $dir_commands)

No description

static string
appendOptions($command)

No description

static string
appendOptionsGlobal($application)

No description

static string
appendArguments($command)

No description

static string
appendUsages(Command $command)

No description

static string
appendPreamble($command, string $root)

No description

static string|null
getVersion(Command $command)

No description

void
writeYml(array $nav_commands, array $nav_generators, array $map_commands, array $map_generators, string $dest)

No description

void
writeAllMd(array $pages_all, string $destination_path, string $title)

No description

void
prepare($destination)

Empty target directories.

static iterable
argToArray(InputArgument $arg)

Build an array since that's what HelpCLIFormatter expects.

static iterable
optionToArray(InputOption $opt)

Build an array since that's what HelpCLIFormatter expects.

static string
cliTextToMarkdown(string $text)

Convert text like foo to foo. Also convert to Markdown links.

array
writeContentFilesAndBuildNavAndBuildRedirectMap(array $namespaced, string $destination, string $dir_root, string $destination_path)

Write content files, add to nav, build a redirect map.

array
getRedirectMap(Command $command, string $destination)

No description

string
getFilename(string $name)

Get a filename from a command.

Details

static AutowireTrait create(ContainerInterface $container)

Instantiates a new instance of the implementing class using autowiring.

Parameters

ContainerInterface $container

The service container this instance should use.

Return Value

AutowireTrait

__construct(BootstrapManager $bootstrapManager, LoggerInterface $logger)

No description

Parameters

BootstrapManager $bootstrapManager
LoggerInterface $logger

protected int execute(InputInterface $input, OutputInterface $output)

No description

Parameters

InputInterface $input
OutputInterface $output

Return Value

int

array createAnnotatedCommands(Application $application_generate, Application $application_drush)

Convert generators into Annotated commands (for Help).

Parameters

Application $application_generate
Application $application_drush

Return Value

array

static protected string appendPostAmble()

No description

Return Value

string

static protected string appendAliases($command)

No description

Parameters

$command

Return Value

string

static protected string appendTopics(AnnotatedCommand $command, string $dir_commands)

No description

Parameters

AnnotatedCommand $command
string $dir_commands

Return Value

string

static protected string appendOptions($command)

No description

Parameters

$command

Return Value

string

static protected string appendOptionsGlobal($application)

No description

Parameters

$application

Return Value

string

static protected string appendArguments($command)

No description

Parameters

$command

Return Value

string

static protected string appendUsages(Command $command)

No description

Parameters

Command $command

Return Value

string

static protected string appendPreamble($command, string $root)

No description

Parameters

$command
string $root

Return Value

string

static protected string|null getVersion(Command $command)

No description

Parameters

Command $command

Return Value

string|null

protected void writeYml(array $nav_commands, array $nav_generators, array $map_commands, array $map_generators, string $dest)

No description

Parameters

array $nav_commands
array $nav_generators
array $map_commands
array $map_generators
string $dest

Return Value

void

protected void writeAllMd(array $pages_all, string $destination_path, string $title)

No description

Parameters

array $pages_all
string $destination_path
string $title

Return Value

void

protected void prepare($destination)

Empty target directories.

Parameters

$destination

Return Value

void

static iterable argToArray(InputArgument $arg)

Build an array since that's what HelpCLIFormatter expects.

Parameters

InputArgument $arg

Return Value

iterable

static iterable optionToArray(InputOption $opt)

Build an array since that's what HelpCLIFormatter expects.

Parameters

InputOption $opt

Return Value

iterable

static string cliTextToMarkdown(string $text)

Convert text like foo to foo. Also convert to Markdown links.

Parameters

string $text

Return Value

string

array writeContentFilesAndBuildNavAndBuildRedirectMap(array $namespaced, string $destination, string $dir_root, string $destination_path)

Write content files, add to nav, build a redirect map.

Parameters

array $namespaced
string $destination
string $dir_root
string $destination_path

Return Value

array

protected array getRedirectMap(Command $command, string $destination)

No description

Parameters

Command $command
string $destination

Return Value

array

string getFilename(string $name)

Get a filename from a command.

Parameters

string $name

Return Value

string