part.xml was in wrong folder, must be "admin/forms"

This commit is contained in:
Thomas Kuschel 2023-10-05 14:34:11 +02:00
parent 47796a6ada
commit 70e987b338
2 changed files with 59 additions and 13 deletions

View File

@ -1,28 +1,74 @@
<?php <?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; 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\HtmlView as BaseHtmlView; use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarHelper;
\defined('_JEDEC') or die; /**
* View to edit an article.
*
* @since 1.6
*/
class HtmlView extends BaseHtmlView class HtmlView extends BaseHtmlView
{ {
/**
* The \JForm object
*
* @var \JForm
*/
protected $form; protected $form;
/**
* The active item
*
* @var object
*/
protected $item; 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.
*
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return mixed A string if successful, otherwise an Error object.
*
* @throws \Exception
* @since 1.6
*/
public function display($tpl = null) public function display($tpl = null)
{ {
$this->form = $this->get('Form'); $this->form = $this->get('Form');
$this->item = $this->get('Item'); $this->item = $this->get('Item');
$this->state = $this->get('State');
parent::display($tpl); if (count($errors = $this->get('Errors'))) {
throw new GenericDataException(implode("\n", $errors), 500);
}
// $this->addToolbar();
return parent::display($tpl);
} }
}
}