DEL unnecessary code
This commit is contained in:
@ -17,14 +17,4 @@ use Joomla\CMS\MVC\Controller\BaseController;
|
||||
class DisplayController extends BaseController
|
||||
{
|
||||
protected $default_view = 'parts';
|
||||
|
||||
public function display($cachable = false, $urlparams = [])
|
||||
{
|
||||
$view = $this->input->get('view', $this->default_view);
|
||||
$layout = $this->input->get('layout', 'default');
|
||||
$id = $this->input->getInt('id');
|
||||
|
||||
return parent::display();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -15,4 +15,4 @@ use Joomla\CMS\Extension\MVCComponent;
|
||||
class DepotComponent extends MVCComponent
|
||||
{
|
||||
|
||||
}
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Depot.Administrator
|
||||
* @subpackage com_depot
|
||||
* @author Thomas Kuschel <thomas@kuschel.at>
|
||||
* @copyright (C) 2023 KW4NZ, <https://www.kuschel.at>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.md
|
||||
* @since 0.0.3
|
||||
*/
|
||||
|
||||
namespace KW4NZ\Component\Depot\Administrator\Model;
|
||||
|
||||
use Joomla\CMS\MVC\Model\AdminModel;
|
||||
|
||||
\defined('_JEXEC') or die;
|
||||
|
||||
class DepotModel extends AdminModel
|
||||
{
|
||||
public function getForm($data = [], $loadData = true)
|
||||
{
|
||||
$form = $this->loadForm('com_depot.part', 'part', ['control' => 'jform', 'load_data' => $loadData]);
|
||||
|
||||
if (empty($form)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return $form;
|
||||
}
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Depot.Administrator
|
||||
* @subpackage com_depot
|
||||
* @author Thomas Kuschel <thomas@kuschel.at>
|
||||
* @copyright (C) 2023 KW4NZ, <https://www.kuschel.at>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.md
|
||||
* @since 0.0.2
|
||||
*/
|
||||
|
||||
namespace KW4NZ\Component\Depot\Administrator\Table;
|
||||
|
||||
use Joomla\CMS\Table\Table;
|
||||
use Joomla\Database\DatabaseDriver;
|
||||
|
||||
\defined('_JEXEC') or die;
|
||||
|
||||
class DepotTable extends Table
|
||||
{
|
||||
function __construct(DatabaseDriver $db)
|
||||
{
|
||||
parent::__construct('#__depot', 'id', $db);
|
||||
}
|
||||
}
|
@ -1,15 +1,19 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Depot.Administrator
|
||||
* @subpackage com_depot
|
||||
* @author Thomas Kuschel <thomas@kuschel.at>
|
||||
* @copyright (C) 2023 KW4NZ, <https://www.kuschel.at>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.md
|
||||
* @since 0.0.3
|
||||
*/
|
||||
|
||||
namespace KW4NZ\Component\Depot\Administrator\View\Part;
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Helper\ContentHelper;
|
||||
use Joomla\CMS\Language\Text;
|
||||
use Joomla\CMS\MVC\View\GenericDataException;
|
||||
// use Joomla\CMS\MVC\View\GenericDataException;
|
||||
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
|
||||
use Joomla\CMS\Toolbar\Toolbar;
|
||||
use Joomla\CMS\Toolbar\ToolbarHelper;
|
||||
|
||||
/**
|
||||
* View to edit an article.
|
||||
@ -32,20 +36,6 @@ class HtmlView extends BaseHtmlView
|
||||
*/
|
||||
protected $item;
|
||||
|
||||
/**
|
||||
* The model state
|
||||
*
|
||||
* @var object
|
||||
*/
|
||||
protected $state;
|
||||
|
||||
/**
|
||||
* The actions the user is authorised to perform
|
||||
*
|
||||
* @var \JObject
|
||||
*/
|
||||
protected $canDo;
|
||||
|
||||
/**
|
||||
* Execute and display a template script.
|
||||
*
|
||||
@ -60,15 +50,11 @@ class HtmlView extends BaseHtmlView
|
||||
{
|
||||
$this->form = $this->get('Form');
|
||||
$this->item = $this->get('Item');
|
||||
$this->state = $this->get('State');
|
||||
|
||||
if (count($errors = $this->get('Errors'))) {
|
||||
throw new GenericDataException(implode("\n", $errors), 500);
|
||||
}
|
||||
|
||||
// $this->addToolbar();
|
||||
// if (count($errors = $this->get('Errors'))) {
|
||||
// throw new GenericDataException(implode("\n", $errors), 500);
|
||||
// }
|
||||
|
||||
return parent::display($tpl);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user