Automattic\WooCommerce\Blocks\BlockTypes
AbstractBlock::__construct
Constructor.
Метод класса: AbstractBlock{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$AbstractBlock = new AbstractBlock(); $AbstractBlock->__construct( $asset_api, $asset_data_registry, $integration_registry, $block_name );
- $asset_api(AssetApi) (обязательный)
- Instance of the asset API.
- $asset_data_registry(AssetDataRegistry) (обязательный)
- Instance of the asset data registry.
- $integration_registry(IntegrationRegistry) (обязательный)
- Instance of the integration registry.
- $block_name(строка)
- Optionally set block name during construct.
По умолчанию:''
Код AbstractBlock::__construct() AbstractBlock:: construct WC 11.1.0
public function __construct( AssetApi $asset_api, AssetDataRegistry $asset_data_registry, IntegrationRegistry $integration_registry, $block_name = '' ) {
$this->asset_api = $asset_api;
$this->asset_data_registry = $asset_data_registry;
$this->integration_registry = $integration_registry;
$this->block_name = $block_name ? $block_name : $this->block_name;
$this->initialize();
}