-
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add block events to allow hooking of data
- Loading branch information
Showing
6 changed files
with
171 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
namespace Jeffreyvr\DropBlockEditor\Events; | ||
|
||
use Illuminate\Foundation\Events\Dispatchable; | ||
|
||
class BlockClone | ||
{ | ||
use Dispatchable; | ||
|
||
/** | ||
* Create a new event instance. | ||
*/ | ||
public function __construct(protected array $block = []) | ||
{ | ||
// | ||
} | ||
|
||
public function setBlock(array $block): void | ||
{ | ||
$this->block = $block; | ||
} | ||
|
||
public function getBlock(): array | ||
{ | ||
return $this->block; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
namespace Jeffreyvr\DropBlockEditor\Events; | ||
|
||
use Illuminate\Foundation\Events\Dispatchable; | ||
|
||
class BlockCloned | ||
{ | ||
use Dispatchable; | ||
|
||
/** | ||
* Create a new event instance. | ||
*/ | ||
public function __construct(protected array $block = []) | ||
{ | ||
// | ||
} | ||
|
||
public function getBlock(): array | ||
{ | ||
return $this->block; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
namespace Jeffreyvr\DropBlockEditor\Events; | ||
|
||
use Illuminate\Foundation\Events\Dispatchable; | ||
|
||
class BlockDeleted | ||
{ | ||
use Dispatchable; | ||
|
||
/** | ||
* Create a new event instance. | ||
*/ | ||
public function __construct(protected array $block = []) | ||
{ | ||
// | ||
} | ||
|
||
public function getBlock(): array | ||
{ | ||
return $this->block; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
namespace Jeffreyvr\DropBlockEditor\Events; | ||
|
||
use Illuminate\Foundation\Events\Dispatchable; | ||
|
||
class BlockInsert | ||
{ | ||
use Dispatchable; | ||
|
||
/** | ||
* Create a new event instance. | ||
*/ | ||
public function __construct(protected array $block = []) | ||
{ | ||
// | ||
} | ||
|
||
public function setBlock(array $block): void | ||
{ | ||
$this->block = $block; | ||
} | ||
|
||
public function getBlock(): array | ||
{ | ||
return $this->block; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
namespace Jeffreyvr\DropBlockEditor\Events; | ||
|
||
use Illuminate\Foundation\Events\Dispatchable; | ||
|
||
class BlockInserted | ||
{ | ||
use Dispatchable; | ||
|
||
/** | ||
* Create a new event instance. | ||
*/ | ||
public function __construct(protected array $block = []) | ||
{ | ||
// | ||
} | ||
|
||
public function getBlock(): array | ||
{ | ||
return $this->block; | ||
} | ||
} |