RainLab\Pages\Classes\Snippet::getComponent PHP Method

getComponent() protected method

This method should not be used in the front-end request handling code.
protected getComponent ( ) : Cms\Classes\ComponentBase
return Cms\Classes\ComponentBase
    protected function getComponent()
    {
        if ($this->componentClass === null) {
            return null;
        }
        if ($this->componentObj !== null) {
            return $this->componentObj;
        }
        $componentClass = $this->componentClass;
        return $this->componentObj = new $componentClass();
    }