latest changes
This commit is contained in:
35
vendor/open-function-computers-llc/rad-theme-engine/src/Commands/GetIconCommand.php
vendored
Normal file
35
vendor/open-function-computers-llc/rad-theme-engine/src/Commands/GetIconCommand.php
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace ofc\Commands;
|
||||
|
||||
use ofc\IconGetter;
|
||||
|
||||
class GetIconCommand
|
||||
{
|
||||
public static function run(array $args): void
|
||||
{
|
||||
if (count($args) !== 1) {
|
||||
fwrite(STDERR, "Usage: rad get-icon <icon-name>\n");
|
||||
var_dump($args);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
$icon = trim(strtolower($args[0]));
|
||||
|
||||
IconGetter::get($icon);
|
||||
}
|
||||
|
||||
public static function getHelp(): string
|
||||
{
|
||||
return <<<HELP
|
||||
Usage: rad get-icon <icon-name>
|
||||
|
||||
Description:
|
||||
Download the SVG icon from https://icons.getbootstrap.com and place it in your theme assets folder.
|
||||
TODO: link to the docs page.
|
||||
|
||||
Example:
|
||||
rad get-icon phone
|
||||
HELP;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user