Merged in feature/117-dev-dev01 (pull request #8)

auto-patch  117-dev-dev01-2023-12-15T16_09_06

* auto-patch  117-dev-dev01-2023-12-15T16_09_06
This commit is contained in:
Tony Volpe
2023-12-15 16:10:57 +00:00
parent 0825f6bd5f
commit 3dc9eca989
1424 changed files with 28118 additions and 10097 deletions

View File

@@ -31,6 +31,11 @@ interface BlockInterface {
*/
public const HIDE_CONDITIONS_KEY = 'hideConditions';
/**
* Key for the block disable conditions in the block configuration.
*/
public const DISABLE_CONDITIONS_KEY = 'disableConditions';
/**
* Get the block name.
*/
@@ -110,6 +115,29 @@ interface BlockInterface {
*/
public function get_hide_conditions(): array;
/**
* Add a disable condition to the block.
*
* The disable condition is a JavaScript-like expression that will be evaluated on the client to determine if the block should be disabled.
* See [@woocommerce/expression-evaluation](https://github.com/woocommerce/woocommerce/blob/trunk/packages/js/expression-evaluation/README.md) for more details.
*
* @param string $expression An expression, which if true, will disable the block.
* @return string The key of the disable condition, which can be used to remove the disable condition.
*/
public function add_disable_condition( string $expression ): string;
/**
* Remove a disable condition from the block.
*
* @param string $key The key of the disable condition to remove.
*/
public function remove_disable_condition( string $key );
/**
* Get the disable conditions of the block.
*/
public function get_disable_conditions(): array;
/**
* Get the block configuration as a formatted template.
*