Plugin development : from ExpressionEngine to Craft Coming to Craft after years with EE, I feel like a newbie again.

I painfully managed to built and install a basic plugin for craft3 with composer, (with a little help from the docs and NYstudio107's tutorial).

For now, the plugin does nothing, and to keep going, I would need to understand how to translate a pattern commonly used in EE.
Get some data from a template, process it and return it.

Get tag data and parameters

$data_to_process = ee()-&gt;TMPL-&gt;tagdata;
$process_param = ee()-&gt;TMPL-&gt;fetch_param('parameter');


Output content to template

ee()-&gt;return_data = $processed_data;


Ho do you do such things in craft ?
If you want to render a template in Craft 3 you can do

$html = Craft::$app-&gt;getView()-&gt;renderTemplate('path/to/template', $variables);


If you want to return/render a template within your Controller action you can do

return $this-&gt;renderTemplate('path/to/template', $variables);


If you want to render a plugin template you'll need to attach your plugins handle to your path

 'plugin-handle/path/to/template'