Exemplo n.º 1
0
 protected function loadTemplate($tpl = null)
 {
     $layout = TZ_Portfolio_PlusPluginHelper::getLayout();
     // Create the template file name based on the layout
     $file = isset($tpl) ? $layout . '_' . $tpl : $layout;
     // Clean the file name
     $file = preg_replace('/[^A-Z0-9_\\.-]/i', '', $file);
     $path = TZ_Portfolio_PlusPluginHelper::getLayoutPath($this->_type, $this->_name, 'admin', $file);
     ob_start();
     require_once $path;
     $html = ob_get_contents();
     ob_end_clean();
     return $html;
 }