WordPress at a glance
function is not described

WP_Block_List::__construct() public WP 5.5.0

Constructor.

Populates object properties from the provided block instance argument.

{} It's a method of the class: WP_Block_List{}

No Hooks.

Return

Null. Nothing.

Usage

$WP_Block_List = new WP_Block_List();
$WP_Block_List->__construct( $blocks, $available_context, $registry );
$blocks(array[]/WP_Block[]) (required)
Array of parsed block data, or block instances.
$available_context(array)
Optional array of ancestry context values.
Default: array()
$registry(WP_Block_Type_Registry)
Optional block type registry.
Default: null

Changelog

Since 5.5.0 Introduced.

Code of WP_Block_List::__construct() WP 5.5.1

<?php
public function __construct( $blocks, $available_context = array(), $registry = null ) {
	if ( ! $registry instanceof WP_Block_Type_Registry ) {
		$registry = WP_Block_Type_Registry::get_instance();
	}

	$this->blocks            = $blocks;
	$this->available_context = $available_context;
	$this->registry          = $registry;
}