| Current Path : /home/giteleslfp/www/administrator/components/com_templateck/helpers/ |
| Current File : /home/giteleslfp/www/administrator/components/com_templateck/helpers/templateckview.php |
<?php
/**
* @name Template Creator CK
* @package com_templateck
* @copyright Copyright (C) 2013. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @author Cedric Keiflin - http://www.template-creator.com - http://www.joomlack.fr
*/
defined('TCK_LOADED') or die;
class TemplateckView extends JViewLegacy {
/*protected $view;
protected $model;
protected $input;
public function __construct() {
$this->input = new TCK_Input();
// check if the user has the rights to access this page
if (!current_user_can('manage_options')) {
wp_die(__('You do not have sufficient permissions to access this page.'));
}
}
public function display($tpl = 'default') {
// check if the user has the rights to access this page
// if (!current_user_can('manage_options')) {
// wp_die(__('You do not have sufficient permissions to access this page.'));
// }
require_once TEMPLATECREATORCK_PATH . '/views/' . strtolower($this->view) . '/tmpl/' . $tpl . '.php';
}
public function get($view, $func, $params) {
$this->view = $view;
$model = $this->getModel();
$funcName = 'get' . ucfirst($func);
return $model->$funcName($params);
}
public function getModel() {
if (empty($this->model)) {
require_once(TEMPLATECREATORCK_PATH . '/models/' . strtolower($this->view) . '.php');
$className = 'TemplateckModel' . ucfirst($this->view);
$this->model = new $className;
}
return $this->model;
}*/
}