Blocks

Create_New_Block_Files
in package

Handles the creation of new block files.

Table of Contents

Properties

$block_details  : Block_Details
$block_options  : Block_Options

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

Methods

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
throws
Exception

If the block already exists.

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

        
On this page

Search results