Frontend\Core\Engine\Block\Widget::__construct PHP Метод

__construct() публичный Метод

public __construct ( Symfony\Component\HttpKernel\KernelInterface $kernel, string $module, string $action, mixed $data = null )
$kernel Symfony\Component\HttpKernel\KernelInterface
$module string The module to load.
$action string The action to load.
$data mixed The data that was passed from the database.
    public function __construct(KernelInterface $kernel, $module, $action, $data = null)
    {
        parent::__construct($kernel);
        // set properties
        $this->setModule($module);
        $this->setAction($action);
        if ($data !== null) {
            $this->setData($data);
        }
        // load the config file for the required module
        $this->loadConfig();
    }