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

__construct() public method

It will grab stuff from the reference.
public __construct ( Symfony\Component\HttpKernel\KernelInterface $kernel )
$kernel Symfony\Component\HttpKernel\KernelInterface
    public function __construct(KernelInterface $kernel)
    {
        parent::__construct($kernel);
        $this->tpl = $this->getContainer()->get('templating');
        $this->URL = $this->getContainer()->get('url');
    }

Usage Example

Example #1
0
 /**
  * @param KernelInterface $kernel
  * @param string          $module The module to use.
  * @param string          $action The action to use.
  * @param string          $data   The data that should be available.
  */
 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');
     // set properties
     $this->setModule($module);
     $this->setAction($action);
     $this->setData($data);
 }
All Usage Examples Of Frontend\Core\Engine\Base\Object::__construct