Frontend\Core\Engine\Base\Block::__construct PHP Method

__construct() public method

public __construct ( Symfony\Component\HttpKernel\KernelInterface $kernel, string $module, string $action, string $data = null )
$kernel Symfony\Component\HttpKernel\KernelInterface
$module string The name of the module.
$action string The name of the action.
$data string The data that should be available in this block.
    public function __construct(KernelInterface $kernel, $module, $action, $data = null)
    {
        parent::__construct($kernel);
        // get objects from the reference so they are accessible
        $this->header = $this->getContainer()->get('header');
        $this->URL = $this->getContainer()->get('url');
        $this->breadcrumb = $this->getContainer()->get('breadcrumb');
        // set properties
        $this->setModule($module);
        $this->setAction($action);
        $this->setData($data);
    }