Class BlockPool
Definition at line 14 of file BlockPool.php.
◆ __construct()
Constructor
- Parameters
-
BlockFactory | $blockFactory | |
Definition at line 34 of file BlockPool.php.
◆ add()
add |
( |
|
$name, |
|
|
|
$class, |
|
|
array |
$arguments = [] |
|
) |
| |
Add a block
- Parameters
-
string | $name | |
string | $class | |
array | $arguments | [optional] |
- Returns
- BlockPool
- Exceptions
-
Definition at line 48 of file BlockPool.php.
51 throw new \InvalidArgumentException(
52 (
string)
new \
Magento\Framework\Phrase(
'Invalid Block class name: %1', [
$class])
$_option $_optionId $class
if(!isset($_GET['name'])) $name
◆ get()
Get blocks
- Parameters
-
- Returns
- BlockInterface|null
Definition at line 69 of file BlockPool.php.
75 return $this->blocks[
$name] ??
null;
if(!isset($_GET['name'])) $name
◆ $blockFactory
◆ $blocks
The documentation for this class was generated from the following file: