<?php
/** 
 * @package     VikRestaurants
 * @subpackage  core
 * @author      E4J s.r.l.
 * @copyright   Copyright (C) 2023 E4J s.r.l. All Rights Reserved.
 * @license     http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 * @link        https://vikwp.com
 */

// No direct access
defined('ABSPATH') or die('No script kiddies please!');

/**
 * VikRestaurants cron job log info view.
 *
 * @since 1.10
 */
class VikRestaurantsViewcronjobloginfo extends JViewVRE
{
	/**
	 * VikRestaurants view display method.
	 *
	 * @return  void
	 */
	function display($tpl = null)
	{
		$input = JFactory::getApplication()->input;

		$id = $input->getUint('id', 0);

		// get cron job log model
		$model = JModelVRE::getInstance('cronjoblog');

		// load item
		$this->log = $model->getItem($id);
		
		if (!$this->log)
		{
			exit('Log not found');
		}
		
		// display the template (default.php)
		parent::display($tpl);
	}
}
