enabling Twig as Template Engine withing own plugin [closed]

I would use output buffering to capture the content, then pass that in to the template.

ob_start();
settings_fields('settings');
$settings_fields = ob_get_clean();
echo $this->twig->render($file, ['val1' =>  $settings_fields]);

I think that should work.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)