forked from joomla/Component-Builder
Robot
f5f308dbf2
Here's an update on the current version, which includes changes towards the next release still in development.
81 lines
2.6 KiB
PHP
81 lines
2.6 KiB
PHP
<?php
|
|
/**
|
|
* @package Joomla.Component.Builder
|
|
*
|
|
* @created 4th September 2022
|
|
* @author Llewellyn van der Merwe <https://dev.vdm.io>
|
|
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
|
|
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
|
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
|
*/
|
|
|
|
// No direct access to this JCB template file (EVER)
|
|
defined('_JCB_TEMPLATE') or die;
|
|
?>
|
|
###BOM###
|
|
namespace ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Extension;
|
|
|
|
use Joomla\CMS\Association\AssociationServiceInterface;
|
|
use Joomla\CMS\Association\AssociationServiceTrait;
|
|
use Joomla\CMS\Categories\CategoryServiceInterface;
|
|
use Joomla\CMS\Categories\CategoryServiceTrait;
|
|
use Joomla\CMS\Component\Router\RouterServiceInterface;
|
|
use Joomla\CMS\Component\Router\RouterServiceTrait;
|
|
use Joomla\CMS\Extension\BootableExtensionInterface;
|
|
use Joomla\CMS\Extension\MVCComponent;
|
|
use Joomla\CMS\Factory;
|
|
use Joomla\CMS\Fields\FieldsServiceInterface;
|
|
use Joomla\CMS\Form\Form;
|
|
use Joomla\CMS\HTML\HTMLRegistryAwareTrait;
|
|
use Joomla\CMS\Language\Text;
|
|
use Joomla\CMS\Tag\TagServiceInterface;
|
|
use Joomla\CMS\Tag\TagServiceTrait;
|
|
use Joomla\CMS\User\UserFactoryInterface;
|
|
// (soon) use ###NAMESPACEPREFIX###\Component\###ComponentNamespace###\Administrator\Service\HTML\AdministratorService;
|
|
use Psr\Container\ContainerInterface;
|
|
|
|
// No direct access to this file
|
|
\defined('_JEXEC') or die;
|
|
|
|
/**
|
|
* Component class for com_###component###
|
|
*
|
|
* @since 4.0
|
|
*/
|
|
class ###Component###Component extends MVCComponent implements
|
|
BootableExtensionInterface,
|
|
CategoryServiceInterface,
|
|
RouterServiceInterface
|
|
{
|
|
use AssociationServiceTrait;
|
|
use HTMLRegistryAwareTrait;
|
|
use RouterServiceTrait;
|
|
use CategoryServiceTrait, TagServiceTrait {
|
|
CategoryServiceTrait::getTableNameForSection insteadof TagServiceTrait;
|
|
CategoryServiceTrait::getStateColumnForSection insteadof TagServiceTrait;
|
|
}
|
|
|
|
/**
|
|
* Booting the extension. This is the function to set up the environment of the extension like
|
|
* registering new class loaders, etc.
|
|
*
|
|
* If required, some initial set up can be done from services of the container, eg.
|
|
* registering HTML services.
|
|
*
|
|
* @param ContainerInterface $container The container
|
|
*
|
|
* @return void
|
|
*
|
|
* @since 4.0.0
|
|
*/
|
|
public function boot(ContainerInterface $container)
|
|
{
|
|
// (soon) $this->getRegistry()->register('###component###administrator', new AdministratorService());
|
|
}
|
|
|
|
// will fix these soon
|
|
protected function getTableNameForSection(string $section = null){}
|
|
public function countItems(array $items, string $section){}
|
|
|
|
}
|