primo commit
This commit is contained in:
46
administrator/components/com_jem/controllers/sampledata.php
Normal file
46
administrator/components/com_jem/controllers/sampledata.php
Normal file
@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/**
|
||||
* @package JEM
|
||||
* @copyright (C) 2013-2024 joomlaeventmanager.net
|
||||
* @copyright (C) 2005-2009 Christoph Lukes
|
||||
* @license https://www.gnu.org/licenses/gpl-3.0 GNU/GPL
|
||||
*/
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\MVC\Controller\BaseController;
|
||||
use Joomla\CMS\Language\Text;
|
||||
|
||||
/**
|
||||
* JEM Component Sampledata Controller
|
||||
* @package JEM
|
||||
*/
|
||||
class JemControllerSampledata extends BaseController
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Process sampledata
|
||||
*/
|
||||
public function load()
|
||||
{
|
||||
$model = $this->getModel('sampledata');
|
||||
|
||||
if (!$model->loadData()) {
|
||||
$msg = Text::_('COM_JEM_SAMPLEDATA_FAILED');
|
||||
} else {
|
||||
$msg = Text::_('COM_JEM_SAMPLEDATA_SUCCESSFULL');
|
||||
}
|
||||
|
||||
$link = 'index.php?option=com_jem&view=main';
|
||||
|
||||
$this->setRedirect($link, $msg);
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user