private function renderPhtml($__phtmlTemplatePath, array $args = [])
    {
        // start output caching
        ob_start();

        // we need to have an alternative to the escape because we have HTML to display for some labels in the form components
        $args['cleanTags'] = function ($val) {
            echo strip_tags($val, '<br>');
        };

        $args['escape'] = function ($val) {
            echo htmlentities($val);
        };

        $args['raw'] = function ($val) {
            echo $val;
        };

        // extract data from array
        extract($args, EXTR_SKIP);

        /** @noinspection PhpIncludeInspection */
        include $__phtmlTemplatePath;

        // assign output cache to variable
        $template = ob_get_clean();

        return (string) $template;
    }
private function renderPhtml($__phtmlTemplatePath, array $args = [])
    {
        // start output caching
        ob_start();

        // we need to have an alternative to the escape because we have HTML to display for some labels in the form components
        $args['cleanTags'] = function ($val) {
            echo strip_tags($val, '<br>');
        };

        $args['escape'] = function ($val) {
            echo htmlentities($val);
        };

        $args['raw'] = function ($val) {
            echo $val;
        };

        // extract data from array
        extract($args, EXTR_SKIP);

        /** @noinspection PhpIncludeInspection */
        include $__phtmlTemplatePath;

        // assign output cache to variable
        $template = ob_get_clean();

        return (string) $template;
    }
@param string $__phtmlTemplatePath
@param array  $args

@return string