Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3c7071d
commit 1a09fea
Showing
4 changed files
with
59 additions
and
9 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
25 changes: 25 additions & 0 deletions
25
src/Drupal/DrupalExtension/Hook/Call/AfterEntityCreate.php
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,25 @@ | ||
<?php | ||
|
||
namespace Drupal\DrupalExtension\Hook\Call; | ||
|
||
use Drupal\DrupalExtension\Hook\Scope\OtherEntityScope; | ||
|
||
/** | ||
* AfterEntityCreate hook class. | ||
*/ | ||
class AfterEntityCreate extends EntityHook { | ||
|
||
/** | ||
* Initializes hook. | ||
*/ | ||
public function __construct($filterString, $callable, $description = null) { | ||
parent::__construct(OtherEntityScope::AFTER, $filterString, $callable, $description); | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function getName() { | ||
return 'AfterEntityCreate'; | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
src/Drupal/DrupalExtension/Hook/Call/BeforeEntityCreate.php
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,26 @@ | ||
<?php | ||
|
||
namespace Drupal\DrupalExtension\Hook\Call; | ||
|
||
use Drupal\DrupalExtension\Hook\Scope\OtherEntityScope; | ||
|
||
/** | ||
* BeforeEntityCreate hook class. | ||
*/ | ||
class BeforeEntityCreate extends EntityHook { | ||
|
||
/** | ||
* Initializes hook. | ||
*/ | ||
public function __construct($filterString, $callable, $description = null) { | ||
parent::__construct(OtherEntityScope::BEFORE, $filterString, $callable, $description); | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function getName() { | ||
return 'BeforeEntityCreate'; | ||
} | ||
|
||
} |