Edit File by line
/home/zeestwma/richards.../wp-conte.../plugins/woocomme.../src/Admin/BlockTem...
File: BlockInterface.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace Automattic\WooCommerce\Admin\BlockTemplates;
[2] Fix | Delete
[3] Fix | Delete
/**
[4] Fix | Delete
* Interface for block configuration used to specify blocks in BlockTemplate.
[5] Fix | Delete
*/
[6] Fix | Delete
interface BlockInterface {
[7] Fix | Delete
/**
[8] Fix | Delete
* Key for the block name in the block configuration.
[9] Fix | Delete
*/
[10] Fix | Delete
public const NAME_KEY = 'blockName';
[11] Fix | Delete
[12] Fix | Delete
/**
[13] Fix | Delete
* Key for the block ID in the block configuration.
[14] Fix | Delete
*/
[15] Fix | Delete
public const ID_KEY = 'id';
[16] Fix | Delete
[17] Fix | Delete
/**
[18] Fix | Delete
* Key for the internal order in the block configuration.
[19] Fix | Delete
*/
[20] Fix | Delete
public const ORDER_KEY = 'order';
[21] Fix | Delete
[22] Fix | Delete
/**
[23] Fix | Delete
* Key for the block attributes in the block configuration.
[24] Fix | Delete
*/
[25] Fix | Delete
public const ATTRIBUTES_KEY = 'attributes';
[26] Fix | Delete
[27] Fix | Delete
/**
[28] Fix | Delete
* Key for the block hide conditions in the block configuration.
[29] Fix | Delete
*/
[30] Fix | Delete
public const HIDE_CONDITIONS_KEY = 'hideConditions';
[31] Fix | Delete
[32] Fix | Delete
/**
[33] Fix | Delete
* Key for the block disable conditions in the block configuration.
[34] Fix | Delete
*/
[35] Fix | Delete
public const DISABLE_CONDITIONS_KEY = 'disableConditions';
[36] Fix | Delete
[37] Fix | Delete
/**
[38] Fix | Delete
* Get the block name.
[39] Fix | Delete
*/
[40] Fix | Delete
public function get_name(): string;
[41] Fix | Delete
[42] Fix | Delete
/**
[43] Fix | Delete
* Get the block ID.
[44] Fix | Delete
*/
[45] Fix | Delete
public function get_id(): string;
[46] Fix | Delete
[47] Fix | Delete
/**
[48] Fix | Delete
* Get the block order.
[49] Fix | Delete
*/
[50] Fix | Delete
public function get_order(): int;
[51] Fix | Delete
[52] Fix | Delete
/**
[53] Fix | Delete
* Set the block order.
[54] Fix | Delete
*
[55] Fix | Delete
* @param int $order The block order.
[56] Fix | Delete
*/
[57] Fix | Delete
public function set_order( int $order );
[58] Fix | Delete
[59] Fix | Delete
/**
[60] Fix | Delete
* Get the block attributes.
[61] Fix | Delete
*/
[62] Fix | Delete
public function get_attributes(): array;
[63] Fix | Delete
[64] Fix | Delete
/**
[65] Fix | Delete
* Set the block attributes.
[66] Fix | Delete
*
[67] Fix | Delete
* @param array $attributes The block attributes.
[68] Fix | Delete
*/
[69] Fix | Delete
public function set_attributes( array $attributes );
[70] Fix | Delete
[71] Fix | Delete
/**
[72] Fix | Delete
* Set a block attribute value without replacing the entire attributes object.
[73] Fix | Delete
*
[74] Fix | Delete
* @param string $key The attribute key.
[75] Fix | Delete
* @param mixed $value The attribute value.
[76] Fix | Delete
*/
[77] Fix | Delete
public function set_attribute( string $key, $value );
[78] Fix | Delete
[79] Fix | Delete
/**
[80] Fix | Delete
* Get the parent container that the block belongs to.
[81] Fix | Delete
*/
[82] Fix | Delete
public function &get_parent(): ContainerInterface;
[83] Fix | Delete
[84] Fix | Delete
/**
[85] Fix | Delete
* Get the root template that the block belongs to.
[86] Fix | Delete
*/
[87] Fix | Delete
public function &get_root_template(): BlockTemplateInterface;
[88] Fix | Delete
[89] Fix | Delete
/**
[90] Fix | Delete
* Remove the block from its parent.
[91] Fix | Delete
*/
[92] Fix | Delete
public function remove();
[93] Fix | Delete
[94] Fix | Delete
/**
[95] Fix | Delete
* Check if the block is detached from its parent or root template.
[96] Fix | Delete
*
[97] Fix | Delete
* @return bool True if the block is detached from its parent or root template.
[98] Fix | Delete
*/
[99] Fix | Delete
public function is_detached(): bool;
[100] Fix | Delete
[101] Fix | Delete
/**
[102] Fix | Delete
* Add a hide condition to the block.
[103] Fix | Delete
*
[104] Fix | Delete
* The hide condition is a JavaScript-like expression that will be evaluated on the client to determine if the block should be hidden.
[105] Fix | Delete
* See [@woocommerce/expression-evaluation](https://github.com/woocommerce/woocommerce/blob/trunk/packages/js/expression-evaluation/README.md) for more details.
[106] Fix | Delete
*
[107] Fix | Delete
* @param string $expression An expression, which if true, will hide the block.
[108] Fix | Delete
* @return string The key of the hide condition, which can be used to remove the hide condition.
[109] Fix | Delete
*/
[110] Fix | Delete
public function add_hide_condition( string $expression ): string;
[111] Fix | Delete
[112] Fix | Delete
/**
[113] Fix | Delete
* Remove a hide condition from the block.
[114] Fix | Delete
*
[115] Fix | Delete
* @param string $key The key of the hide condition to remove.
[116] Fix | Delete
*/
[117] Fix | Delete
public function remove_hide_condition( string $key );
[118] Fix | Delete
[119] Fix | Delete
/**
[120] Fix | Delete
* Get the hide conditions of the block.
[121] Fix | Delete
*/
[122] Fix | Delete
public function get_hide_conditions(): array;
[123] Fix | Delete
[124] Fix | Delete
/**
[125] Fix | Delete
* Add a disable condition to the block.
[126] Fix | Delete
*
[127] Fix | Delete
* The disable condition is a JavaScript-like expression that will be evaluated on the client to determine if the block should be disabled.
[128] Fix | Delete
* See [@woocommerce/expression-evaluation](https://github.com/woocommerce/woocommerce/blob/trunk/packages/js/expression-evaluation/README.md) for more details.
[129] Fix | Delete
*
[130] Fix | Delete
* @param string $expression An expression, which if true, will disable the block.
[131] Fix | Delete
* @return string The key of the disable condition, which can be used to remove the disable condition.
[132] Fix | Delete
*/
[133] Fix | Delete
public function add_disable_condition( string $expression ): string;
[134] Fix | Delete
[135] Fix | Delete
/**
[136] Fix | Delete
* Remove a disable condition from the block.
[137] Fix | Delete
*
[138] Fix | Delete
* @param string $key The key of the disable condition to remove.
[139] Fix | Delete
*/
[140] Fix | Delete
public function remove_disable_condition( string $key );
[141] Fix | Delete
[142] Fix | Delete
/**
[143] Fix | Delete
* Get the disable conditions of the block.
[144] Fix | Delete
*/
[145] Fix | Delete
public function get_disable_conditions(): array;
[146] Fix | Delete
[147] Fix | Delete
/**
[148] Fix | Delete
* Get the block configuration as a formatted template.
[149] Fix | Delete
*
[150] Fix | Delete
* @return array The block configuration as a formatted template.
[151] Fix | Delete
*/
[152] Fix | Delete
public function get_formatted_template(): array;
[153] Fix | Delete
}
[154] Fix | Delete
[155] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function