Removed some bugs in abstract class, added testcase
This commit is contained in:
35
src/admin/views/test/view.html.php
Normal file
35
src/admin/views/test/view.html.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Joomla\CMS\Toolbar\ToolbarHelper;
|
||||
use Joomla\CMS\MVC\View\HtmlView;
|
||||
|
||||
// No direct access.
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
JLoader::register("ClubsControllerClub", JPATH_ROOT . "/administrator/components/com_clubs/controllers/club.php");
|
||||
|
||||
class ClubsViewTest extends HtmlView
|
||||
{
|
||||
function display($tpl = null)
|
||||
{
|
||||
ToolbarHelper::title('Test');
|
||||
|
||||
$factory = new CommonClubsModelFactoryClub();
|
||||
$this->clubs = $factory->loadElements();
|
||||
|
||||
$this->club = $this->clubs[0];
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
protected function getViewName()
|
||||
{
|
||||
return 'club';
|
||||
}
|
||||
protected function getElementController()
|
||||
{
|
||||
return new ClubsControllerClub();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user