Create_New_Block_Files
in package
Handles the creation of new block files.
Table of Contents
Properties
Methods
- __construct() : mixed
- Constructor for the class.
- copy_file() : void
- Copy a file to the destination.
- handle() : mixed
- Runs the creation of the new block files.
- recursive_copy() : void
- Recursively copy the stubs directory to the block folder.
Properties
$block_details
protected
Block_Details
$block_details
$block_options
protected
Block_Options
$block_options
Methods
__construct()
Constructor for the class.
public
__construct(Block_Details $block_details, Block_Options $block_options) : mixed
Parameters
- $block_details : Block_Details
-
The block details.
- $block_options : Block_Options
copy_file()
Copy a file to the destination.
protected
static copy_file(string $source, string $destination, Block_Options $block_options) : void
Parameters
- $source : string
-
The source file.
- $destination : string
-
The destination file.
- $block_options : Block_Options
handle()
Runs the creation of the new block files.
protected
handle() : mixed
Tags
recursive_copy()
Recursively copy the stubs directory to the block folder.
protected
static recursive_copy(string $source, string $destination, Block_Options $block_options) : void
Parameters
- $source : string
-
The source directory.
- $destination : string
-
The destination directory.
- $block_options : Block_Options