-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Twig Hooks] Introduce DisabledHookable object to mark disabled hooka…
…bles
- Loading branch information
1 parent
91db7f0
commit da72e2b
Showing
26 changed files
with
223 additions
and
396 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
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,29 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Sylius\TwigHooks\Hookable; | ||
|
||
class DisabledHookable extends AbstractHookable | ||
{ | ||
public function __construct( | ||
string $hookName, | ||
string $name, | ||
array $context = [], | ||
array $configuration = [], | ||
?int $priority = null, | ||
) { | ||
parent::__construct($hookName, $name, $context, $configuration, $priority); | ||
} | ||
|
||
public function toArray(): array | ||
{ | ||
return [ | ||
'hookName' => $this->hookName, | ||
'name' => $this->name, | ||
'context' => $this->context, | ||
'configuration' => $this->configuration, | ||
'priority' => $this->priority(), | ||
]; | ||
} | ||
} |
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
Oops, something went wrong.