/**
  * render plugin data and additional flexdata
  *
  * @param string $templateCode
  * @param tx_rnbase_configurations $configurations
  * @return string
  */
 protected function renderPluginData($templateCode, tx_rnbase_configurations $configurations)
 {
     // render only, if there is an controller
     if (!$this->getController()) {
         return $templateCode;
     }
     // check, if there are plugin markers to render
     if (!tx_rnbase_util_BaseMarker::containsMarker($templateCode, 'PLUGIN_')) {
         return $templateCode;
     }
     $confId = $this->getController()->getConfId();
     $markerArray = array();
     // build the data to render
     $pluginData = array_merge((array) $configurations->getCObj()->data, $configurations->getExploded($confId . 'plugin.flexdata.'));
     // check for unused columns
     $ignoreColumns = tx_rnbase_util_BaseMarker::findUnusedCols($pluginData, $templateCode, 'PLUGIN');
     // create the marker array with the parsed columns
     $markerArray = $configurations->getFormatter()->getItemMarkerArrayWrapped($pluginData, $confId . 'plugin.', $ignoreColumns, 'PLUGIN_');
     return tx_rnbase_util_BaseMarker::substituteMarkerArrayCached($templateCode, $markerArray);
 }