update 2023-10-04 18:35:53
This commit is contained in:
parent
677b8ace35
commit
dc62360576
|
@ -0,0 +1,30 @@
|
|||
```
|
||||
██████╗ ██████╗ ██╗ ██╗███████╗██████╗
|
||||
██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗
|
||||
██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝
|
||||
██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗
|
||||
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
|
||||
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
|
||||
```
|
||||
# final class Category (Details)
|
||||
> namespace: **VDM\Joomla\Componentbuilder\Compiler\Builder**
|
||||
> extends: **StorageRegistry**
|
||||
```uml
|
||||
@startuml
|
||||
class Category << (F,LightGreen) >> #RoyalBlue {
|
||||
}
|
||||
|
||||
@enduml
|
||||
```
|
||||
|
||||
---
|
||||
```
|
||||
██╗ ██████╗██████╗
|
||||
██║██╔════╝██╔══██╗
|
||||
██║██║ ██████╔╝
|
||||
██ ██║██║ ██╔══██╗
|
||||
╚█████╔╝╚██████╗██████╔╝
|
||||
╚════╝ ╚═════╝╚═════╝
|
||||
```
|
||||
> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
<?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
|
||||
*/
|
||||
|
||||
namespace VDM\Joomla\Componentbuilder\Compiler\Builder;
|
||||
|
||||
|
||||
use VDM\Joomla\Interfaces\Storageregistryinterface;
|
||||
use VDM\Joomla\Abstraction\StorageRegistry;
|
||||
|
||||
|
||||
/**
|
||||
* Category Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class Category extends StorageRegistry implements Storageregistryinterface
|
||||
{
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
###CODEPOWER###
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"add_head": "0",
|
||||
"add_licensing_template": "2",
|
||||
"extends": "7e822c03-1b20-41d1-9427-f5b8d5836af7",
|
||||
"guid": "007177eb-d39d-4093-8840-07a38811c502",
|
||||
"implements": [
|
||||
"64e291c2-11f1-423d-a44d-837cc12cc017"
|
||||
],
|
||||
"load_selection": null,
|
||||
"name": "Category",
|
||||
"power_version": "1.0.0",
|
||||
"system_name": "JCB.Compiler.Builder.Category",
|
||||
"type": "final class",
|
||||
"use_selection": null,
|
||||
"namespace": "VDM\\Joomla\\Componentbuilder.Compiler.Builder.Category",
|
||||
"description": "Category Builder Class\r\n\r\n@since 3.2.0",
|
||||
"licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/joomla\/Component-Builder>\r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n",
|
||||
"head": "",
|
||||
"composer": ""
|
||||
}
|
|
@ -0,0 +1,77 @@
|
|||
```
|
||||
██████╗ ██████╗ ██╗ ██╗███████╗██████╗
|
||||
██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗
|
||||
██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝
|
||||
██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗
|
||||
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
|
||||
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
|
||||
```
|
||||
# class Power (Details)
|
||||
> namespace: **VDM\Joomla\Componentbuilder\Power\Service**
|
||||
```uml
|
||||
@startuml
|
||||
class Power #Gold {
|
||||
+ register(Container $container) : void
|
||||
+ getConfig(Container $container) : Config
|
||||
+ getTable(Container $container) : Table
|
||||
+ getGrep(Container $container) : Grep
|
||||
+ getSuperpower(Container $container) : Superpower
|
||||
+ getParser(Container $container) : Parser
|
||||
}
|
||||
|
||||
note right of Power::register
|
||||
Registers the service provider with a DI container.
|
||||
|
||||
since: 3.2.0
|
||||
return: void
|
||||
end note
|
||||
|
||||
note right of Power::getConfig
|
||||
Get The Config Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: Config
|
||||
end note
|
||||
|
||||
note right of Power::getTable
|
||||
Get The Table Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: Table
|
||||
end note
|
||||
|
||||
note right of Power::getGrep
|
||||
Get The Grep Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: Grep
|
||||
end note
|
||||
|
||||
note right of Power::getSuperpower
|
||||
Get The Super Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: Superpower
|
||||
end note
|
||||
|
||||
note right of Power::getParser
|
||||
Get The Parser Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: Parser
|
||||
end note
|
||||
|
||||
@enduml
|
||||
```
|
||||
|
||||
---
|
||||
```
|
||||
██╗ ██████╗██████╗
|
||||
██║██╔════╝██╔══██╗
|
||||
██║██║ ██████╔╝
|
||||
██ ██║██║ ██╔══██╗
|
||||
╚█████╔╝╚██████╗██████╔╝
|
||||
╚════╝ ╚═════╝╚═════╝
|
||||
```
|
||||
> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
||||
|
|
@ -0,0 +1,130 @@
|
|||
<?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
|
||||
*/
|
||||
|
||||
namespace VDM\Joomla\Componentbuilder\Power\Service;
|
||||
|
||||
|
||||
use Joomla\DI\Container;
|
||||
use Joomla\DI\ServiceProviderInterface;
|
||||
use VDM\Joomla\Componentbuilder\Power\Config;
|
||||
use VDM\Joomla\Componentbuilder\Table;
|
||||
use VDM\Joomla\Componentbuilder\Power\Grep;
|
||||
use VDM\Joomla\Componentbuilder\Power\Super as Superpower;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Power\Parser;
|
||||
|
||||
|
||||
/**
|
||||
* Power Service Provider
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
class Power implements ServiceProviderInterface
|
||||
{
|
||||
/**
|
||||
* Registers the service provider with a DI container.
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return void
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function register(Container $container)
|
||||
{
|
||||
$container->alias(Config::class, 'Config')
|
||||
->share('Config', [$this, 'getConfig'], true);
|
||||
|
||||
$container->alias(Table::class, 'Table')
|
||||
->share('Table', [$this, 'getTable'], true);
|
||||
|
||||
$container->alias(Grep::class, 'Power.Grep')
|
||||
->share('Power.Grep', [$this, 'getGrep'], true);
|
||||
|
||||
$container->alias(Superpower::class, 'Superpower')
|
||||
->share('Superpower', [$this, 'getSuperpower'], true);
|
||||
|
||||
$container->alias(Parser::class, 'Power.Parser')
|
||||
->share('Power.Parser', [$this, 'getParser'], true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get The Config Class.
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Config
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getConfig(Container $container): Config
|
||||
{
|
||||
return new Config();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get The Table Class.
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Table
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getTable(Container $container): Table
|
||||
{
|
||||
return new Table();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get The Grep Class.
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Grep
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getGrep(Container $container): Grep
|
||||
{
|
||||
return new Grep(
|
||||
$container->get('Config')->local_powers_repository_path,
|
||||
$container->get('Config')->approved_paths,
|
||||
$container->get('Gitea.Repository.Contents')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get The Super Class.
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Superpower
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getSuperpower(Container $container): Superpower
|
||||
{
|
||||
return new Superpower(
|
||||
$container->get('Power.Grep'),
|
||||
$container->get('Power.Insert'),
|
||||
$container->get('Power.Update')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get The Parser Class.
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Parser
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getParser(Container $container): Parser
|
||||
{
|
||||
return new Parser();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
/**
|
||||
* Registers the service provider with a DI container.
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return void
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function register(Container $container)
|
||||
{
|
||||
$container->alias(Config::class, 'Config')
|
||||
->share('Config', [$this, 'getConfig'], true);
|
||||
|
||||
$container->alias(Table::class, 'Table')
|
||||
->share('Table', [$this, 'getTable'], true);
|
||||
|
||||
$container->alias(Grep::class, 'Power.Grep')
|
||||
->share('Power.Grep', [$this, 'getGrep'], true);
|
||||
|
||||
$container->alias(Superpower::class, 'Superpower')
|
||||
->share('Superpower', [$this, 'getSuperpower'], true);
|
||||
|
||||
$container->alias(Parser::class, 'Power.Parser')
|
||||
->share('Power.Parser', [$this, 'getParser'], true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get The Config Class.
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Config
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getConfig(Container $container): Config
|
||||
{
|
||||
return new Config();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get The Table Class.
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Table
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getTable(Container $container): Table
|
||||
{
|
||||
return new Table();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get The Grep Class.
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Grep
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getGrep(Container $container): Grep
|
||||
{
|
||||
return new Grep(
|
||||
$container->get('Config')->local_powers_repository_path,
|
||||
$container->get('Config')->approved_paths,
|
||||
$container->get('Gitea.Repository.Contents')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get The Super Class.
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Superpower
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getSuperpower(Container $container): Superpower
|
||||
{
|
||||
return new Superpower(
|
||||
$container->get('Power.Grep'),
|
||||
$container->get('Power.Insert'),
|
||||
$container->get('Power.Update')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get The Parser Class.
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return Parser
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function getParser(Container $container): Parser
|
||||
{
|
||||
return new Parser();
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
"add_head": "1",
|
||||
"add_licensing_template": "2",
|
||||
"extends": "0",
|
||||
"guid": "02bc072b-1e89-46c1-9732-4da77b1a9ac9",
|
||||
"implements": [
|
||||
"-1"
|
||||
],
|
||||
"load_selection": null,
|
||||
"name": "Power",
|
||||
"power_version": "1.0.0",
|
||||
"system_name": "JCB.Power.Service.Power",
|
||||
"type": "class",
|
||||
"use_selection": {
|
||||
"use_selection0": {
|
||||
"use": "be4ccfae-65a9-401e-bdbe-637d8c226954",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection1": {
|
||||
"use": "bfd1d6d5-56c1-4fe9-9fee-1c5910e1f5d8",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection2": {
|
||||
"use": "6784dd52-0909-451a-a872-9a942a023c68",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection3": {
|
||||
"use": "3ab0eba9-f37b-4b37-aec1-2e78067f2aff",
|
||||
"as": "Superpower"
|
||||
},
|
||||
"use_selection4": {
|
||||
"use": "95d0e03f-24fd-4412-bc2e-f0899fcc3205",
|
||||
"as": "default"
|
||||
}
|
||||
},
|
||||
"namespace": "VDM\\Joomla\\Componentbuilder.Power.Service.Power",
|
||||
"description": "Power Service Provider\r\n\r\n@since 3.2.0",
|
||||
"implements_custom": "ServiceProviderInterface",
|
||||
"licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/joomla\/Component-Builder>\r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n",
|
||||
"head": "use Joomla\\DI\\Container;\r\nuse Joomla\\DI\\ServiceProviderInterface;",
|
||||
"composer": ""
|
||||
}
|
|
@ -25,6 +25,8 @@ class Infusion #Gold {
|
|||
+ set() : void
|
||||
- parsePowers() : void
|
||||
- setSuperPowers() : void
|
||||
- mergePowers($powers, $old) : void
|
||||
- sortPowers($powers) : void
|
||||
- setPowers() : void
|
||||
- index(array $powers) : string
|
||||
- code(object $power) : string
|
||||
|
@ -70,6 +72,20 @@ note left of Infusion::setSuperPowers
|
|||
return: void
|
||||
end note
|
||||
|
||||
note right of Infusion::mergePowers
|
||||
Merge the old missing powers found in local repository back into the index
|
||||
|
||||
since: 3.2.0
|
||||
return: void
|
||||
end note
|
||||
|
||||
note left of Infusion::sortPowers
|
||||
Sort Powers
|
||||
|
||||
since: 3.2.0
|
||||
return: void
|
||||
end note
|
||||
|
||||
note right of Infusion::setPowers
|
||||
Set the Powers code
|
||||
|
||||
|
|
|
@ -113,7 +113,6 @@ class Infusion
|
|||
**/
|
||||
protected array $linker = [
|
||||
'add_head' => 'add_head',
|
||||
'unchanged_composer' => 'composer',
|
||||
'unchanged_description' => 'description',
|
||||
'extends' => 'extends',
|
||||
'unchanged_extends_custom' => 'extends_custom',
|
||||
|
@ -232,9 +231,18 @@ class Infusion
|
|||
array(&$context, &$path, &$key, &$powers)
|
||||
);
|
||||
|
||||
// we add and all missing powers
|
||||
if (isset($this->power->old_superpowers[$path]))
|
||||
{
|
||||
$this->mergePowers($powers, $this->power->old_superpowers[$path]);
|
||||
}
|
||||
|
||||
// POWERREADME
|
||||
$this->content->set_($key, 'POWERREADME', $this->reposreadme->get($powers));
|
||||
|
||||
// sort all powers
|
||||
$this->sortPowers($powers);
|
||||
|
||||
// POWERINDEX
|
||||
$this->content->set_($key, 'POWERINDEX', $this->index($powers));
|
||||
|
||||
|
@ -247,6 +255,34 @@ class Infusion
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Merge the old missing powers found in local repository back into the index
|
||||
*
|
||||
* @return void
|
||||
* @since 3.2.0
|
||||
*/
|
||||
private function mergePowers(array &$powers, array &$old)
|
||||
{
|
||||
foreach ($old as $guid => $values)
|
||||
{
|
||||
if (!isset($powers[$guid]))
|
||||
{
|
||||
$powers[$guid] = $values;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sort Powers
|
||||
*
|
||||
* @return void
|
||||
* @since 3.2.0
|
||||
*/
|
||||
private function sortPowers(array &$powers)
|
||||
{
|
||||
ksort($powers, SORT_STRING);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the Powers code
|
||||
*
|
||||
|
|
|
@ -78,7 +78,6 @@
|
|||
**/
|
||||
protected array $linker = [
|
||||
'add_head' => 'add_head',
|
||||
'unchanged_composer' => 'composer',
|
||||
'unchanged_description' => 'description',
|
||||
'extends' => 'extends',
|
||||
'unchanged_extends_custom' => 'extends_custom',
|
||||
|
@ -197,9 +196,18 @@
|
|||
array(&$context, &$path, &$key, &$powers)
|
||||
);
|
||||
|
||||
// we add and all missing powers
|
||||
if (isset($this->power->old_superpowers[$path]))
|
||||
{
|
||||
$this->mergePowers($powers, $this->power->old_superpowers[$path]);
|
||||
}
|
||||
|
||||
// POWERREADME
|
||||
$this->content->set_($key, 'POWERREADME', $this->reposreadme->get($powers));
|
||||
|
||||
// sort all powers
|
||||
$this->sortPowers($powers);
|
||||
|
||||
// POWERINDEX
|
||||
$this->content->set_($key, 'POWERINDEX', $this->index($powers));
|
||||
|
||||
|
@ -212,6 +220,34 @@
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Merge the old missing powers found in local repository back into the index
|
||||
*
|
||||
* @return void
|
||||
* @since 3.2.0
|
||||
*/
|
||||
private function mergePowers(array &$powers, array &$old)
|
||||
{
|
||||
foreach ($old as $guid => $values)
|
||||
{
|
||||
if (!isset($powers[$guid]))
|
||||
{
|
||||
$powers[$guid] = $values;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sort Powers
|
||||
*
|
||||
* @return void
|
||||
* @since 3.2.0
|
||||
*/
|
||||
private function sortPowers(array &$powers)
|
||||
{
|
||||
ksort($powers, SORT_STRING);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the Powers code
|
||||
*
|
||||
|
|
|
@ -0,0 +1,74 @@
|
|||
```
|
||||
██████╗ ██████╗ ██╗ ██╗███████╗██████╗
|
||||
██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗
|
||||
██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝
|
||||
██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗
|
||||
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
|
||||
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
|
||||
```
|
||||
# final class FieldsetString (Details)
|
||||
> namespace: **VDM\Joomla\Componentbuilder\Compiler\Creator**
|
||||
```uml
|
||||
@startuml
|
||||
class FieldsetString << (F,LightGreen) >> #RoyalBlue {
|
||||
# Config $config
|
||||
# Placeholder $placeholder
|
||||
# Language $language
|
||||
# Event $event
|
||||
# Permission $permission
|
||||
# FieldDynamic $fielddynamic
|
||||
# FieldNames $fieldnames
|
||||
# AccessSwitch $accessswitch
|
||||
# MetaData $metadata
|
||||
# Layout $layout
|
||||
# Counter $counter
|
||||
+ __construct(Config $config, Placeholder $placeholder, ...)
|
||||
+ get(array $view, string $component, ...) : string
|
||||
}
|
||||
|
||||
note right of FieldsetString::__construct
|
||||
Constructor.
|
||||
|
||||
since: 3.2.0
|
||||
|
||||
arguments:
|
||||
Config $config
|
||||
Placeholder $placeholder
|
||||
Language $language
|
||||
Event $event
|
||||
Permission $permission
|
||||
FieldDynamic $fielddynamic
|
||||
FieldNames $fieldnames
|
||||
AccessSwitch $accessswitch
|
||||
MetaData $metadata
|
||||
Layout $layout
|
||||
Counter $counter
|
||||
end note
|
||||
|
||||
note right of FieldsetString::get
|
||||
Get a fieldset
|
||||
|
||||
since: 3.2.0
|
||||
return: string
|
||||
|
||||
arguments:
|
||||
array $view
|
||||
string $component
|
||||
string $nameSingleCode
|
||||
string $nameListCode
|
||||
end note
|
||||
|
||||
@enduml
|
||||
```
|
||||
|
||||
---
|
||||
```
|
||||
██╗ ██████╗██████╗
|
||||
██║██╔════╝██╔══██╗
|
||||
██║██║ ██████╔╝
|
||||
██ ██║██║ ██╔══██╗
|
||||
╚█████╔╝╚██████╗██████╔╝
|
||||
╚════╝ ╚═════╝╚═════╝
|
||||
```
|
||||
> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
||||
|
|
@ -0,0 +1,616 @@
|
|||
<?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
|
||||
*/
|
||||
|
||||
namespace VDM\Joomla\Componentbuilder\Compiler\Creator;
|
||||
|
||||
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Config;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Placeholder;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Language\Fieldset as Language;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Interfaces\EventInterface as Event;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Adminview\Permission;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Creator\FieldDynamic;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Builder\FieldNames;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Builder\AccessSwitch;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Builder\MetaData;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Creator\Layout;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Counter;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line;
|
||||
use VDM\Joomla\Utilities\StringHelper;
|
||||
use VDM\Joomla\Utilities\ArrayHelper;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Creator\Fieldsetinterface;
|
||||
|
||||
|
||||
/**
|
||||
* Fieldset String Creator Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class FieldsetString implements Fieldsetinterface
|
||||
{
|
||||
/**
|
||||
* The Config Class.
|
||||
*
|
||||
* @var Config
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Config $config;
|
||||
|
||||
/**
|
||||
* The Placeholder Class.
|
||||
*
|
||||
* @var Placeholder
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Placeholder $placeholder;
|
||||
|
||||
/**
|
||||
* The Fieldset Class.
|
||||
*
|
||||
* @var Language
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Language $language;
|
||||
|
||||
/**
|
||||
* The EventInterface Class.
|
||||
*
|
||||
* @var Event
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Event $event;
|
||||
|
||||
/**
|
||||
* The Permission Class.
|
||||
*
|
||||
* @var Permission
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Permission $permission;
|
||||
|
||||
/**
|
||||
* The FieldDynamic Class.
|
||||
*
|
||||
* @var FieldDynamic
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected FieldDynamic $fielddynamic;
|
||||
|
||||
/**
|
||||
* The FieldNames Class.
|
||||
*
|
||||
* @var FieldNames
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected FieldNames $fieldnames;
|
||||
|
||||
/**
|
||||
* The AccessSwitch Class.
|
||||
*
|
||||
* @var AccessSwitch
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected AccessSwitch $accessswitch;
|
||||
|
||||
/**
|
||||
* The MetaData Class.
|
||||
*
|
||||
* @var MetaData
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected MetaData $metadata;
|
||||
|
||||
/**
|
||||
* The Layout Class.
|
||||
*
|
||||
* @var Layout
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Layout $layout;
|
||||
|
||||
/**
|
||||
* The Counter Class.
|
||||
*
|
||||
* @var Counter
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Counter $counter;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param Config $config The Config Class.
|
||||
* @param Placeholder $placeholder The Placeholder Class.
|
||||
* @param Language $language The Fieldset Class.
|
||||
* @param Event $event The EventInterface Class.
|
||||
* @param Permission $permission The Permission Class.
|
||||
* @param FieldDynamic $fielddynamic The FieldDynamic Class.
|
||||
* @param FieldNames $fieldnames The FieldNames Class.
|
||||
* @param AccessSwitch $accessswitch The AccessSwitch Class.
|
||||
* @param MetaData $metadata The MetaData Class.
|
||||
* @param Layout $layout The Layout Class.
|
||||
* @param Counter $counter The Counter Class.
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function __construct(Config $config, Placeholder $placeholder,
|
||||
Language $language, Event $event, Permission $permission,
|
||||
FieldDynamic $fielddynamic, FieldNames $fieldnames,
|
||||
AccessSwitch $accessswitch, MetaData $metadata,
|
||||
Layout $layout, Counter $counter)
|
||||
{
|
||||
$this->config = $config;
|
||||
$this->placeholder = $placeholder;
|
||||
$this->language = $language;
|
||||
$this->event = $event;
|
||||
$this->permission = $permission;
|
||||
$this->fielddynamic = $fielddynamic;
|
||||
$this->fieldnames = $fieldnames;
|
||||
$this->accessswitch = $accessswitch;
|
||||
$this->metadata = $metadata;
|
||||
$this->layout = $layout;
|
||||
$this->counter = $counter;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a fieldset
|
||||
*
|
||||
* @param array $view The view data
|
||||
* @param string $component The component name
|
||||
* @param string $nameSingleCode The single view name
|
||||
* @param string $nameListCode The list view name
|
||||
*
|
||||
* @return string The fields set as a string or empty string if no field found.
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function get(array $view, string $component, string $nameSingleCode,
|
||||
string $nameListCode): string
|
||||
{
|
||||
// setup the fieldset language values of this view
|
||||
if (!isset($view['settings']->fields)
|
||||
|| !ArrayHelper::check($view['settings']->fields))
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
// add metadata to the view
|
||||
$metadata = false;
|
||||
if (isset($view['metadata']) && $view['metadata'])
|
||||
{
|
||||
$metadata = true;
|
||||
}
|
||||
|
||||
// add access to the view
|
||||
$access = false;
|
||||
if (isset($view['access']) && $view['access'])
|
||||
{
|
||||
$access = true;
|
||||
}
|
||||
|
||||
// main lang prefix
|
||||
$lang_view = $this->config->lang_prefix . '_'
|
||||
. $this->placeholder->get('VIEW');
|
||||
$lang_views = $this->config->lang_prefix . '_'
|
||||
. $this->placeholder->get('VIEWS');
|
||||
|
||||
$name_single = $view['settings']->name_single ?? 'Error';
|
||||
$name_list = $view['settings']->name_list ?? 'Error';
|
||||
$lang_target = $this->config->lang_target ?? 'both';
|
||||
|
||||
// load the language values
|
||||
$this->language->set(
|
||||
$access,
|
||||
$metadata,
|
||||
$lang_target,
|
||||
$lang_view,
|
||||
$lang_views,
|
||||
$name_single,
|
||||
$name_list,
|
||||
$nameSingleCode,
|
||||
$nameListCode
|
||||
);
|
||||
|
||||
// set the read only
|
||||
$read_only = false;
|
||||
if ($view['settings']->type == 2)
|
||||
{
|
||||
$read_only = Indent::_(3) . 'readonly="true"' . PHP_EOL . Indent::_(
|
||||
3
|
||||
) . 'disabled="true"';
|
||||
}
|
||||
// start adding dynamic fields
|
||||
$dynamic_fields = '';
|
||||
// set the custom table key
|
||||
$dbkey = 'g';
|
||||
// for plugin event TODO change event api signatures
|
||||
$placeholders = $this->placeholder->active;
|
||||
$component_context = $this->config->component_context;
|
||||
// Trigger Event: jcb_ce_onBeforeBuildFields
|
||||
$this->event->trigger(
|
||||
'jcb_ce_onBeforeBuildFields',
|
||||
array(&$component_context, &$dynamic_fields, &$read_only,
|
||||
&$dbkey, &$view, &$component, &$nameSingleCode,
|
||||
&$nameListCode, &$placeholders, &$lang_view,
|
||||
&$lang_views)
|
||||
);
|
||||
unset($placeholders);
|
||||
// TODO we should add the global and local view switch if field for front end
|
||||
foreach ($view['settings']->fields as $field)
|
||||
{
|
||||
$dynamic_fields .= $this->fielddynamic->get(
|
||||
$field, $view, $view['settings']->type, $lang_view,
|
||||
$nameSingleCode, $nameListCode, $this->placeholder->active, $dbkey,
|
||||
true
|
||||
);
|
||||
}
|
||||
// for plugin event TODO change event api signatures
|
||||
$placeholders = $this->placeholder->active;
|
||||
// Trigger Event: jcb_ce_onAfterBuildFields
|
||||
$this->event->trigger(
|
||||
'jcb_ce_onAfterBuildFields',
|
||||
array(&$component_context, &$dynamic_fields, &$read_only,
|
||||
&$dbkey, &$view, &$component, &$nameSingleCode,
|
||||
&$nameListCode, &$placeholders, &$lang_view,
|
||||
&$lang_views)
|
||||
);
|
||||
unset($placeholders);
|
||||
// set the default fields
|
||||
$field_set = array();
|
||||
$field_set[] = '<fieldset name="details">';
|
||||
$field_set[] = Indent::_(2) . "<!--" . Line::_(__Line__, __Class__)
|
||||
. " Default Fields. -->";
|
||||
$field_set[] = Indent::_(2) . "<!--" . Line::_(__Line__, __Class__)
|
||||
. " Id Field. Type: Text (joomla) -->";
|
||||
// if id is not set
|
||||
if (!$this->fieldnames->isString($nameSingleCode . '.id'))
|
||||
{
|
||||
$field_set[] = Indent::_(2) . "<field";
|
||||
$field_set[] = Indent::_(3) . "name=" . '"id"';
|
||||
$field_set[] = Indent::_(3)
|
||||
. 'type="text" class="readonly" label="JGLOBAL_FIELD_ID_LABEL"';
|
||||
$field_set[] = Indent::_(3)
|
||||
. 'description ="JGLOBAL_FIELD_ID_DESC" size="10" default="0"';
|
||||
$field_set[] = Indent::_(3) . 'readonly="true"';
|
||||
$field_set[] = Indent::_(2) . "/>";
|
||||
// count the static field created
|
||||
$this->counter->field++;
|
||||
}
|
||||
// if created is not set
|
||||
if (!$this->fieldnames->isString($nameSingleCode . '.created'))
|
||||
{
|
||||
$field_set[] = Indent::_(2) . "<!--" . Line::_(__Line__, __Class__)
|
||||
. " Date Created Field. Type: Calendar (joomla) -->";
|
||||
$field_set[] = Indent::_(2) . "<field";
|
||||
$field_set[] = Indent::_(3) . "name=" . '"created"';
|
||||
$field_set[] = Indent::_(3) . "type=" . '"calendar"';
|
||||
$field_set[] = Indent::_(3) . "label=" . '"' . $lang_view
|
||||
. '_CREATED_DATE_LABEL"';
|
||||
$field_set[] = Indent::_(3) . "description=" . '"' . $lang_view
|
||||
. '_CREATED_DATE_DESC"';
|
||||
$field_set[] = Indent::_(3) . "size=" . '"22"';
|
||||
if ($read_only)
|
||||
{
|
||||
$field_set[] = $read_only;
|
||||
}
|
||||
$field_set[] = Indent::_(3) . "format=" . '"%Y-%m-%d %H:%M:%S"';
|
||||
$field_set[] = Indent::_(3) . "filter=" . '"user_utc"';
|
||||
$field_set[] = Indent::_(2) . "/>";
|
||||
// count the static field created
|
||||
$this->counter->field++;
|
||||
}
|
||||
// if created_by is not set
|
||||
if (!$this->fieldnames->isString($nameSingleCode . '.created_by'))
|
||||
{
|
||||
$field_set[] = Indent::_(2) . "<!--" . Line::_(__Line__, __Class__)
|
||||
. " User Created Field. Type: User (joomla) -->";
|
||||
$field_set[] = Indent::_(2) . "<field";
|
||||
$field_set[] = Indent::_(3) . "name=" . '"created_by"';
|
||||
$field_set[] = Indent::_(3) . "type=" . '"user"';
|
||||
$field_set[] = Indent::_(3) . "label=" . '"' . $lang_view
|
||||
. '_CREATED_BY_LABEL"';
|
||||
if ($read_only)
|
||||
{
|
||||
$field_set[] = $read_only;
|
||||
}
|
||||
$field_set[] = Indent::_(3) . "description=" . '"' . $lang_view
|
||||
. '_CREATED_BY_DESC"';
|
||||
$field_set[] = Indent::_(2) . "/>";
|
||||
// count the static field created
|
||||
$this->counter->field++;
|
||||
}
|
||||
// if published is not set
|
||||
if (!$this->fieldnames->isString($nameSingleCode . '.published'))
|
||||
{
|
||||
$field_set[] = Indent::_(2) . "<!--" . Line::_(__Line__, __Class__)
|
||||
. " Published Field. Type: List (joomla) -->";
|
||||
$field_set[] = Indent::_(2) . "<field name="
|
||||
. '"published" type="list" label="JSTATUS"';
|
||||
$field_set[] = Indent::_(3) . "description="
|
||||
. '"JFIELD_PUBLISHED_DESC" class="chzn-color-state"';
|
||||
if ($read_only)
|
||||
{
|
||||
$field_set[] = $read_only;
|
||||
}
|
||||
$field_set[] = Indent::_(3) . "filter="
|
||||
. '"intval" size="1" default="1" >';
|
||||
$field_set[] = Indent::_(3) . "<option value=" . '"1">';
|
||||
$field_set[] = Indent::_(4) . "JPUBLISHED</option>";
|
||||
$field_set[] = Indent::_(3) . "<option value=" . '"0">';
|
||||
$field_set[] = Indent::_(4) . "JUNPUBLISHED</option>";
|
||||
$field_set[] = Indent::_(3) . "<option value=" . '"2">';
|
||||
$field_set[] = Indent::_(4) . "JARCHIVED</option>";
|
||||
$field_set[] = Indent::_(3) . "<option value=" . '"-2">';
|
||||
$field_set[] = Indent::_(4) . "JTRASHED</option>";
|
||||
$field_set[] = Indent::_(2) . "</field>";
|
||||
// count the static field created
|
||||
$this->counter->field++;
|
||||
}
|
||||
// if modified is not set
|
||||
if (!$this->fieldnames->isString($nameSingleCode . '.modified'))
|
||||
{
|
||||
$field_set[] = Indent::_(2) . "<!--" . Line::_(__Line__, __Class__)
|
||||
. " Date Modified Field. Type: Calendar (joomla) -->";
|
||||
$field_set[] = Indent::_(2)
|
||||
. '<field name="modified" type="calendar" class="readonly"';
|
||||
$field_set[] = Indent::_(3) . 'label="' . $lang_view
|
||||
. '_MODIFIED_DATE_LABEL" description="' . $lang_view
|
||||
. '_MODIFIED_DATE_DESC"';
|
||||
$field_set[] = Indent::_(3)
|
||||
. 'size="22" readonly="true" format="%Y-%m-%d %H:%M:%S" filter="user_utc" />';
|
||||
// count the static field created
|
||||
$this->counter->field++;
|
||||
}
|
||||
// if modified_by is not set
|
||||
if (!$this->fieldnames->isString($nameSingleCode . '.modified_by'))
|
||||
{
|
||||
$field_set[] = Indent::_(2) . "<!--" . Line::_(__Line__, __Class__)
|
||||
. " User Modified Field. Type: User (joomla) -->";
|
||||
$field_set[] = Indent::_(2)
|
||||
. '<field name="modified_by" type="user"';
|
||||
$field_set[] = Indent::_(3) . 'label="' . $lang_view
|
||||
. '_MODIFIED_BY_LABEL"';
|
||||
$field_set[] = Indent::_(3) . "description=" . '"' . $lang_view
|
||||
. '_MODIFIED_BY_DESC"';
|
||||
$field_set[] = Indent::_(3) . 'class="readonly"';
|
||||
$field_set[] = Indent::_(3) . 'readonly="true"';
|
||||
$field_set[] = Indent::_(3) . 'filter="unset"';
|
||||
$field_set[] = Indent::_(2) . "/>";
|
||||
// count the static field created
|
||||
$this->counter->field++;
|
||||
}
|
||||
// check if view has access
|
||||
if ($this->accessswitch->exists($nameSingleCode)
|
||||
&& !$this->fieldnames->isString($nameSingleCode . '.access'))
|
||||
{
|
||||
$field_set[] = Indent::_(2) . "<!--" . Line::_(__Line__, __Class__)
|
||||
. " Access Field. Type: Accesslevel (joomla) -->";
|
||||
$field_set[] = Indent::_(2) . '<field name="access"';
|
||||
$field_set[] = Indent::_(3) . 'type="accesslevel"';
|
||||
$field_set[] = Indent::_(3) . 'label="JFIELD_ACCESS_LABEL"';
|
||||
$field_set[] = Indent::_(3) . 'description="JFIELD_ACCESS_DESC"';
|
||||
$field_set[] = Indent::_(3) . 'default="1"';
|
||||
if ($read_only)
|
||||
{
|
||||
$field_set[] = $read_only;
|
||||
}
|
||||
$field_set[] = Indent::_(3) . 'required="false"';
|
||||
$field_set[] = Indent::_(2) . "/>";
|
||||
// count the static field created
|
||||
$this->counter->field++;
|
||||
}
|
||||
// if ordering is not set
|
||||
if (!$this->fieldnames->isString($nameSingleCode . '.ordering'))
|
||||
{
|
||||
$field_set[] = Indent::_(2) . "<!--" . Line::_(__Line__, __Class__)
|
||||
. " Ordering Field. Type: Numbers (joomla) -->";
|
||||
$field_set[] = Indent::_(2) . "<field";
|
||||
$field_set[] = Indent::_(3) . 'name="ordering"';
|
||||
$field_set[] = Indent::_(3) . 'type="number"';
|
||||
$field_set[] = Indent::_(3) . 'class="inputbox validate-ordering"';
|
||||
$field_set[] = Indent::_(3) . 'label="' . $lang_view
|
||||
. '_ORDERING_LABEL' . '"';
|
||||
$field_set[] = Indent::_(3) . 'description=""';
|
||||
$field_set[] = Indent::_(3) . 'default="0"';
|
||||
$field_set[] = Indent::_(3) . 'size="6"';
|
||||
if ($read_only)
|
||||
{
|
||||
$field_set[] = $read_only;
|
||||
}
|
||||
$field_set[] = Indent::_(3) . 'required="false"';
|
||||
$field_set[] = Indent::_(2) . "/>";
|
||||
// count the static field created
|
||||
$this->counter->field++;
|
||||
}
|
||||
// if version is not set
|
||||
if (!$this->fieldnames->isString($nameSingleCode . '.version'))
|
||||
{
|
||||
$field_set[] = Indent::_(2) . "<!--" . Line::_(__Line__, __Class__)
|
||||
. " Version Field. Type: Text (joomla) -->";
|
||||
$field_set[] = Indent::_(2) . "<field";
|
||||
$field_set[] = Indent::_(3) . 'name="version"';
|
||||
$field_set[] = Indent::_(3) . 'type="text"';
|
||||
$field_set[] = Indent::_(3) . 'class="readonly"';
|
||||
$field_set[] = Indent::_(3) . 'label="' . $lang_view
|
||||
. '_VERSION_LABEL"';
|
||||
$field_set[] = Indent::_(3) . 'description="' . $lang_view
|
||||
. '_VERSION_DESC"';
|
||||
$field_set[] = Indent::_(3) . 'size="6"';
|
||||
$field_set[] = Indent::_(3) . 'readonly="true"';
|
||||
$field_set[] = Indent::_(3) . 'filter="unset"';
|
||||
$field_set[] = Indent::_(2) . "/>";
|
||||
// count the static field created
|
||||
$this->counter->field++;
|
||||
}
|
||||
// check if metadata is added to this view
|
||||
if ($this->metadata->isString($nameSingleCode))
|
||||
{
|
||||
// metakey
|
||||
if (!$this->fieldnames->isString($nameSingleCode . '.metakey'))
|
||||
{
|
||||
$field_set[] = Indent::_(2) . "<!--" . Line::_(__Line__, __Class__)
|
||||
. " Metakey Field. Type: Textarea (joomla) -->";
|
||||
$field_set[] = Indent::_(2) . "<field";
|
||||
$field_set[] = Indent::_(3) . 'name="metakey"';
|
||||
$field_set[] = Indent::_(3) . 'type="textarea"';
|
||||
$field_set[] = Indent::_(3)
|
||||
. 'label="JFIELD_META_KEYWORDS_LABEL"';
|
||||
$field_set[] = Indent::_(3)
|
||||
. 'description="JFIELD_META_KEYWORDS_DESC"';
|
||||
$field_set[] = Indent::_(3) . 'rows="3"';
|
||||
$field_set[] = Indent::_(3) . 'cols="30"';
|
||||
$field_set[] = Indent::_(2) . "/>";
|
||||
// count the static field created
|
||||
$this->counter->field++;
|
||||
}
|
||||
// metadesc
|
||||
if (!$this->fieldnames->isString($nameSingleCode . '.metadesc'))
|
||||
{
|
||||
$field_set[] = Indent::_(2) . "<!--" . Line::_(__Line__, __Class__)
|
||||
. " Metadesc Field. Type: Textarea (joomla) -->";
|
||||
$field_set[] = Indent::_(2) . "<field";
|
||||
$field_set[] = Indent::_(3) . 'name="metadesc"';
|
||||
$field_set[] = Indent::_(3) . 'type="textarea"';
|
||||
$field_set[] = Indent::_(3)
|
||||
. 'label="JFIELD_META_DESCRIPTION_LABEL"';
|
||||
$field_set[] = Indent::_(3)
|
||||
. 'description="JFIELD_META_DESCRIPTION_DESC"';
|
||||
$field_set[] = Indent::_(3) . 'rows="3"';
|
||||
$field_set[] = Indent::_(3) . 'cols="30"';
|
||||
$field_set[] = Indent::_(2) . "/>";
|
||||
// count the static field created
|
||||
$this->counter->field++;
|
||||
}
|
||||
}
|
||||
// fix the permissions field "title" issue gh-629
|
||||
// check if the title is not already set
|
||||
if (!$this->fieldnames->isString($nameSingleCode . '.title')
|
||||
&& $this->permission->check($view, $nameSingleCode))
|
||||
{
|
||||
// set the field/tab name
|
||||
$field_name = "title";
|
||||
$tab_name = "publishing";
|
||||
$field_set[] = Indent::_(2) . "<!--" . Line::_(__Line__, __Class__)
|
||||
. " Was added due to Permissions JS needing a Title field -->";
|
||||
$field_set[] = Indent::_(2) . "<!--" . Line::_(__Line__, __Class__)
|
||||
. " Let us know at gh-629 should this change -->";
|
||||
$field_set[] = Indent::_(2) . "<!--" . Line::_(__Line__, __Class__)
|
||||
. " https://github.com/vdm-io/Joomla-Component-Builder/issues/629#issuecomment-750117235 -->";
|
||||
// at this point we know that we must add a hidden title field
|
||||
// and make sure it does not get stored to the database
|
||||
$field_set[] = Indent::_(2) . "<field";
|
||||
$field_set[] = Indent::_(3) . "name=" . '"' . $field_name . '"';
|
||||
$field_set[] = Indent::_(3)
|
||||
. 'type="hidden"';
|
||||
$field_set[] = Indent::_(3) . 'default="' . $component . ' '
|
||||
. $nameSingleCode . '"';
|
||||
$field_set[] = Indent::_(2) . "/>";
|
||||
// count the static field created
|
||||
$this->counter->field++;
|
||||
// setup needed field values for layout
|
||||
$field_array = array();
|
||||
$field_array['order_edit'] = 0;
|
||||
$field_array['tab'] = 15;
|
||||
$field_array['alignment'] = 1;
|
||||
// make sure it gets added to view
|
||||
$this->layout->set(
|
||||
$nameSingleCode, $tab_name, $field_name, $field_array
|
||||
);
|
||||
}
|
||||
// load the dynamic fields now
|
||||
if (StringHelper::check($dynamic_fields))
|
||||
{
|
||||
$field_set[] = Indent::_(2) . "<!--" . Line::_(__Line__, __Class__)
|
||||
. " Dynamic Fields. -->" . $dynamic_fields;
|
||||
}
|
||||
// close fieldset
|
||||
$field_set[] = Indent::_(1) . "</fieldset>";
|
||||
// check if metadata is added to this view
|
||||
if ($this->metadata->isString($nameSingleCode))
|
||||
{
|
||||
if (!$this->fieldnames->isString($nameSingleCode . '.robots')
|
||||
|| !$this->fieldnames->isString($nameSingleCode . '.rights')
|
||||
|| !$this->fieldnames->isString($nameSingleCode . '.author'))
|
||||
{
|
||||
$field_set[] = PHP_EOL . Indent::_(1) . "<!--" . Line::_(
|
||||
__LINE__,__CLASS__
|
||||
) . " Metadata Fields. -->";
|
||||
$field_set[] = Indent::_(1) . "<fields"
|
||||
. ' name="metadata" label="JGLOBAL_FIELDSET_METADATA_OPTIONS">';
|
||||
$field_set[] = Indent::_(2) . '<fieldset name="vdmmetadata"';
|
||||
$field_set[] = Indent::_(3)
|
||||
. 'label="JGLOBAL_FIELDSET_METADATA_OPTIONS">';
|
||||
// robots
|
||||
if (!$this->fieldnames->isString($nameSingleCode . '.robots'))
|
||||
{
|
||||
$field_set[] = Indent::_(3) . "<!--" . Line::_(
|
||||
__LINE__,__CLASS__
|
||||
) . " Robots Field. Type: List (joomla) -->";
|
||||
$field_set[] = Indent::_(3) . '<field name="robots"';
|
||||
$field_set[] = Indent::_(4) . 'type="list"';
|
||||
$field_set[] = Indent::_(4)
|
||||
. 'label="JFIELD_METADATA_ROBOTS_LABEL"';
|
||||
$field_set[] = Indent::_(4)
|
||||
. 'description="JFIELD_METADATA_ROBOTS_DESC" >';
|
||||
$field_set[] = Indent::_(4)
|
||||
. '<option value="">JGLOBAL_USE_GLOBAL</option>';
|
||||
$field_set[] = Indent::_(4)
|
||||
. '<option value="index, follow">JGLOBAL_INDEX_FOLLOW</option>';
|
||||
$field_set[] = Indent::_(4)
|
||||
. '<option value="noindex, follow">JGLOBAL_NOINDEX_FOLLOW</option>';
|
||||
$field_set[] = Indent::_(4)
|
||||
. '<option value="index, nofollow">JGLOBAL_INDEX_NOFOLLOW</option>';
|
||||
$field_set[] = Indent::_(4)
|
||||
. '<option value="noindex, nofollow">JGLOBAL_NOINDEX_NOFOLLOW</option>';
|
||||
$field_set[] = Indent::_(3) . '</field>';
|
||||
// count the static field created
|
||||
$this->counter->field++;
|
||||
}
|
||||
// author
|
||||
if (!$this->fieldnames->isString($nameSingleCode . '.author'))
|
||||
{
|
||||
$field_set[] = Indent::_(3) . "<!--" . Line::_(
|
||||
__LINE__,__CLASS__
|
||||
) . " Author Field. Type: Text (joomla) -->";
|
||||
$field_set[] = Indent::_(3) . '<field name="author"';
|
||||
$field_set[] = Indent::_(4) . 'type="text"';
|
||||
$field_set[] = Indent::_(4)
|
||||
. 'label="JAUTHOR" description="JFIELD_METADATA_AUTHOR_DESC"';
|
||||
$field_set[] = Indent::_(4) . 'size="20"';
|
||||
$field_set[] = Indent::_(3) . "/>";
|
||||
// count the static field created
|
||||
$this->counter->field++;
|
||||
}
|
||||
// rights
|
||||
if (!$this->fieldnames->isString($nameSingleCode . '.rights'))
|
||||
{
|
||||
$field_set[] = Indent::_(3) . "<!--" . Line::_(
|
||||
__LINE__,__CLASS__
|
||||
) . " Rights Field. Type: Textarea (joomla) -->";
|
||||
$field_set[] = Indent::_(3)
|
||||
. '<field name="rights" type="textarea" label="JFIELD_META_RIGHTS_LABEL"';
|
||||
$field_set[] = Indent::_(4)
|
||||
. 'description="JFIELD_META_RIGHTS_DESC" required="false" filter="string"';
|
||||
$field_set[] = Indent::_(4) . 'cols="30" rows="2"';
|
||||
$field_set[] = Indent::_(3) . "/>";
|
||||
// count the static field created
|
||||
$this->counter->field++;
|
||||
}
|
||||
$field_set[] = Indent::_(2) . "</fieldset>";
|
||||
$field_set[] = Indent::_(1) . "</fields>";
|
||||
}
|
||||
}
|
||||
|
||||
// return the set
|
||||
return implode(PHP_EOL, $field_set);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,575 @@
|
|||
/**
|
||||
* The Config Class.
|
||||
*
|
||||
* @var Config
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Config $config;
|
||||
|
||||
/**
|
||||
* The Placeholder Class.
|
||||
*
|
||||
* @var Placeholder
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Placeholder $placeholder;
|
||||
|
||||
/**
|
||||
* The Fieldset Class.
|
||||
*
|
||||
* @var Language
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Language $language;
|
||||
|
||||
/**
|
||||
* The EventInterface Class.
|
||||
*
|
||||
* @var Event
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Event $event;
|
||||
|
||||
/**
|
||||
* The Permission Class.
|
||||
*
|
||||
* @var Permission
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Permission $permission;
|
||||
|
||||
/**
|
||||
* The FieldDynamic Class.
|
||||
*
|
||||
* @var FieldDynamic
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected FieldDynamic $fielddynamic;
|
||||
|
||||
/**
|
||||
* The FieldNames Class.
|
||||
*
|
||||
* @var FieldNames
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected FieldNames $fieldnames;
|
||||
|
||||
/**
|
||||
* The AccessSwitch Class.
|
||||
*
|
||||
* @var AccessSwitch
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected AccessSwitch $accessswitch;
|
||||
|
||||
/**
|
||||
* The MetaData Class.
|
||||
*
|
||||
* @var MetaData
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected MetaData $metadata;
|
||||
|
||||
/**
|
||||
* The Layout Class.
|
||||
*
|
||||
* @var Layout
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Layout $layout;
|
||||
|
||||
/**
|
||||
* The Counter Class.
|
||||
*
|
||||
* @var Counter
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Counter $counter;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param Config $config The Config Class.
|
||||
* @param Placeholder $placeholder The Placeholder Class.
|
||||
* @param Language $language The Fieldset Class.
|
||||
* @param Event $event The EventInterface Class.
|
||||
* @param Permission $permission The Permission Class.
|
||||
* @param FieldDynamic $fielddynamic The FieldDynamic Class.
|
||||
* @param FieldNames $fieldnames The FieldNames Class.
|
||||
* @param AccessSwitch $accessswitch The AccessSwitch Class.
|
||||
* @param MetaData $metadata The MetaData Class.
|
||||
* @param Layout $layout The Layout Class.
|
||||
* @param Counter $counter The Counter Class.
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function __construct(Config $config, Placeholder $placeholder,
|
||||
Language $language, Event $event, Permission $permission,
|
||||
FieldDynamic $fielddynamic, FieldNames $fieldnames,
|
||||
AccessSwitch $accessswitch, MetaData $metadata,
|
||||
Layout $layout, Counter $counter)
|
||||
{
|
||||
$this->config = $config;
|
||||
$this->placeholder = $placeholder;
|
||||
$this->language = $language;
|
||||
$this->event = $event;
|
||||
$this->permission = $permission;
|
||||
$this->fielddynamic = $fielddynamic;
|
||||
$this->fieldnames = $fieldnames;
|
||||
$this->accessswitch = $accessswitch;
|
||||
$this->metadata = $metadata;
|
||||
$this->layout = $layout;
|
||||
$this->counter = $counter;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a fieldset
|
||||
*
|
||||
* @param array $view The view data
|
||||
* @param string $component The component name
|
||||
* @param string $nameSingleCode The single view name
|
||||
* @param string $nameListCode The list view name
|
||||
*
|
||||
* @return string The fields set as a string or empty string if no field found.
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function get(array $view, string $component, string $nameSingleCode,
|
||||
string $nameListCode): string
|
||||
{
|
||||
// setup the fieldset language values of this view
|
||||
if (!isset($view['settings']->fields)
|
||||
|| !ArrayHelper::check($view['settings']->fields))
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
// add metadata to the view
|
||||
$metadata = false;
|
||||
if (isset($view['metadata']) && $view['metadata'])
|
||||
{
|
||||
$metadata = true;
|
||||
}
|
||||
|
||||
// add access to the view
|
||||
$access = false;
|
||||
if (isset($view['access']) && $view['access'])
|
||||
{
|
||||
$access = true;
|
||||
}
|
||||
|
||||
// main lang prefix
|
||||
$lang_view = $this->config->lang_prefix . '_'
|
||||
. $this->placeholder->get('VIEW');
|
||||
$lang_views = $this->config->lang_prefix . '_'
|
||||
. $this->placeholder->get('VIEWS');
|
||||
|
||||
$name_single = $view['settings']->name_single ?? 'Error';
|
||||
$name_list = $view['settings']->name_list ?? 'Error';
|
||||
$lang_target = $this->config->lang_target ?? 'both';
|
||||
|
||||
// load the language values
|
||||
$this->language->set(
|
||||
$access,
|
||||
$metadata,
|
||||
$lang_target,
|
||||
$lang_view,
|
||||
$lang_views,
|
||||
$name_single,
|
||||
$name_list,
|
||||
$nameSingleCode,
|
||||
$nameListCode
|
||||
);
|
||||
|
||||
// set the read only
|
||||
$read_only = false;
|
||||
if ($view['settings']->type == 2)
|
||||
{
|
||||
$read_only = Indent::_(3) . 'readonly="true"' . PHP_EOL . Indent::_(
|
||||
3
|
||||
) . 'disabled="true"';
|
||||
}
|
||||
// start adding dynamic fields
|
||||
$dynamic_fields = '';
|
||||
// set the custom table key
|
||||
$dbkey = 'g';
|
||||
// for plugin event TODO change event api signatures
|
||||
$placeholders = $this->placeholder->active;
|
||||
$component_context = $this->config->component_context;
|
||||
// Trigger Event: jcb_ce_onBeforeBuildFields
|
||||
$this->event->trigger(
|
||||
'jcb_ce_onBeforeBuildFields',
|
||||
array(&$component_context, &$dynamic_fields, &$read_only,
|
||||
&$dbkey, &$view, &$component, &$nameSingleCode,
|
||||
&$nameListCode, &$placeholders, &$lang_view,
|
||||
&$lang_views)
|
||||
);
|
||||
unset($placeholders);
|
||||
// TODO we should add the global and local view switch if field for front end
|
||||
foreach ($view['settings']->fields as $field)
|
||||
{
|
||||
$dynamic_fields .= $this->fielddynamic->get(
|
||||
$field, $view, $view['settings']->type, $lang_view,
|
||||
$nameSingleCode, $nameListCode, $this->placeholder->active, $dbkey,
|
||||
true
|
||||
);
|
||||
}
|
||||
// for plugin event TODO change event api signatures
|
||||
$placeholders = $this->placeholder->active;
|
||||
// Trigger Event: jcb_ce_onAfterBuildFields
|
||||
$this->event->trigger(
|
||||
'jcb_ce_onAfterBuildFields',
|
||||
array(&$component_context, &$dynamic_fields, &$read_only,
|
||||
&$dbkey, &$view, &$component, &$nameSingleCode,
|
||||
&$nameListCode, &$placeholders, &$lang_view,
|
||||
&$lang_views)
|
||||
);
|
||||
unset($placeholders);
|
||||
// set the default fields
|
||||
$field_set = array();
|
||||
$field_set[] = '<fieldset name="details">';
|
||||
$field_set[] = Indent::_(2) . "<!--" . Line::_(__Line__, __Class__)
|
||||
. " Default Fields. -->";
|
||||
$field_set[] = Indent::_(2) . "<!--" . Line::_(__Line__, __Class__)
|
||||
. " Id Field. Type: Text (joomla) -->";
|
||||
// if id is not set
|
||||
if (!$this->fieldnames->isString($nameSingleCode . '.id'))
|
||||
{
|
||||
$field_set[] = Indent::_(2) . "<field";
|
||||
$field_set[] = Indent::_(3) . "name=" . '"id"';
|
||||
$field_set[] = Indent::_(3)
|
||||
. 'type="text" class="readonly" label="JGLOBAL_FIELD_ID_LABEL"';
|
||||
$field_set[] = Indent::_(3)
|
||||
. 'description ="JGLOBAL_FIELD_ID_DESC" size="10" default="0"';
|
||||
$field_set[] = Indent::_(3) . 'readonly="true"';
|
||||
$field_set[] = Indent::_(2) . "/>";
|
||||
// count the static field created
|
||||
$this->counter->field++;
|
||||
}
|
||||
// if created is not set
|
||||
if (!$this->fieldnames->isString($nameSingleCode . '.created'))
|
||||
{
|
||||
$field_set[] = Indent::_(2) . "<!--" . Line::_(__Line__, __Class__)
|
||||
. " Date Created Field. Type: Calendar (joomla) -->";
|
||||
$field_set[] = Indent::_(2) . "<field";
|
||||
$field_set[] = Indent::_(3) . "name=" . '"created"';
|
||||
$field_set[] = Indent::_(3) . "type=" . '"calendar"';
|
||||
$field_set[] = Indent::_(3) . "label=" . '"' . $lang_view
|
||||
. '_CREATED_DATE_LABEL"';
|
||||
$field_set[] = Indent::_(3) . "description=" . '"' . $lang_view
|
||||
. '_CREATED_DATE_DESC"';
|
||||
$field_set[] = Indent::_(3) . "size=" . '"22"';
|
||||
if ($read_only)
|
||||
{
|
||||
$field_set[] = $read_only;
|
||||
}
|
||||
$field_set[] = Indent::_(3) . "format=" . '"%Y-%m-%d %H:%M:%S"';
|
||||
$field_set[] = Indent::_(3) . "filter=" . '"user_utc"';
|
||||
$field_set[] = Indent::_(2) . "/>";
|
||||
// count the static field created
|
||||
$this->counter->field++;
|
||||
}
|
||||
// if created_by is not set
|
||||
if (!$this->fieldnames->isString($nameSingleCode . '.created_by'))
|
||||
{
|
||||
$field_set[] = Indent::_(2) . "<!--" . Line::_(__Line__, __Class__)
|
||||
. " User Created Field. Type: User (joomla) -->";
|
||||
$field_set[] = Indent::_(2) . "<field";
|
||||
$field_set[] = Indent::_(3) . "name=" . '"created_by"';
|
||||
$field_set[] = Indent::_(3) . "type=" . '"user"';
|
||||
$field_set[] = Indent::_(3) . "label=" . '"' . $lang_view
|
||||
. '_CREATED_BY_LABEL"';
|
||||
if ($read_only)
|
||||
{
|
||||
$field_set[] = $read_only;
|
||||
}
|
||||
$field_set[] = Indent::_(3) . "description=" . '"' . $lang_view
|
||||
. '_CREATED_BY_DESC"';
|
||||
$field_set[] = Indent::_(2) . "/>";
|
||||
// count the static field created
|
||||
$this->counter->field++;
|
||||
}
|
||||
// if published is not set
|
||||
if (!$this->fieldnames->isString($nameSingleCode . '.published'))
|
||||
{
|
||||
$field_set[] = Indent::_(2) . "<!--" . Line::_(__Line__, __Class__)
|
||||
. " Published Field. Type: List (joomla) -->";
|
||||
$field_set[] = Indent::_(2) . "<field name="
|
||||
. '"published" type="list" label="JSTATUS"';
|
||||
$field_set[] = Indent::_(3) . "description="
|
||||
. '"JFIELD_PUBLISHED_DESC" class="chzn-color-state"';
|
||||
if ($read_only)
|
||||
{
|
||||
$field_set[] = $read_only;
|
||||
}
|
||||
$field_set[] = Indent::_(3) . "filter="
|
||||
. '"intval" size="1" default="1" >';
|
||||
$field_set[] = Indent::_(3) . "<option value=" . '"1">';
|
||||
$field_set[] = Indent::_(4) . "JPUBLISHED</option>";
|
||||
$field_set[] = Indent::_(3) . "<option value=" . '"0">';
|
||||
$field_set[] = Indent::_(4) . "JUNPUBLISHED</option>";
|
||||
$field_set[] = Indent::_(3) . "<option value=" . '"2">';
|
||||
$field_set[] = Indent::_(4) . "JARCHIVED</option>";
|
||||
$field_set[] = Indent::_(3) . "<option value=" . '"-2">';
|
||||
$field_set[] = Indent::_(4) . "JTRASHED</option>";
|
||||
$field_set[] = Indent::_(2) . "</field>";
|
||||
// count the static field created
|
||||
$this->counter->field++;
|
||||
}
|
||||
// if modified is not set
|
||||
if (!$this->fieldnames->isString($nameSingleCode . '.modified'))
|
||||
{
|
||||
$field_set[] = Indent::_(2) . "<!--" . Line::_(__Line__, __Class__)
|
||||
. " Date Modified Field. Type: Calendar (joomla) -->";
|
||||
$field_set[] = Indent::_(2)
|
||||
. '<field name="modified" type="calendar" class="readonly"';
|
||||
$field_set[] = Indent::_(3) . 'label="' . $lang_view
|
||||
. '_MODIFIED_DATE_LABEL" description="' . $lang_view
|
||||
. '_MODIFIED_DATE_DESC"';
|
||||
$field_set[] = Indent::_(3)
|
||||
. 'size="22" readonly="true" format="%Y-%m-%d %H:%M:%S" filter="user_utc" />';
|
||||
// count the static field created
|
||||
$this->counter->field++;
|
||||
}
|
||||
// if modified_by is not set
|
||||
if (!$this->fieldnames->isString($nameSingleCode . '.modified_by'))
|
||||
{
|
||||
$field_set[] = Indent::_(2) . "<!--" . Line::_(__Line__, __Class__)
|
||||
. " User Modified Field. Type: User (joomla) -->";
|
||||
$field_set[] = Indent::_(2)
|
||||
. '<field name="modified_by" type="user"';
|
||||
$field_set[] = Indent::_(3) . 'label="' . $lang_view
|
||||
. '_MODIFIED_BY_LABEL"';
|
||||
$field_set[] = Indent::_(3) . "description=" . '"' . $lang_view
|
||||
. '_MODIFIED_BY_DESC"';
|
||||
$field_set[] = Indent::_(3) . 'class="readonly"';
|
||||
$field_set[] = Indent::_(3) . 'readonly="true"';
|
||||
$field_set[] = Indent::_(3) . 'filter="unset"';
|
||||
$field_set[] = Indent::_(2) . "/>";
|
||||
// count the static field created
|
||||
$this->counter->field++;
|
||||
}
|
||||
// check if view has access
|
||||
if ($this->accessswitch->exists($nameSingleCode)
|
||||
&& !$this->fieldnames->isString($nameSingleCode . '.access'))
|
||||
{
|
||||
$field_set[] = Indent::_(2) . "<!--" . Line::_(__Line__, __Class__)
|
||||
. " Access Field. Type: Accesslevel (joomla) -->";
|
||||
$field_set[] = Indent::_(2) . '<field name="access"';
|
||||
$field_set[] = Indent::_(3) . 'type="accesslevel"';
|
||||
$field_set[] = Indent::_(3) . 'label="JFIELD_ACCESS_LABEL"';
|
||||
$field_set[] = Indent::_(3) . 'description="JFIELD_ACCESS_DESC"';
|
||||
$field_set[] = Indent::_(3) . 'default="1"';
|
||||
if ($read_only)
|
||||
{
|
||||
$field_set[] = $read_only;
|
||||
}
|
||||
$field_set[] = Indent::_(3) . 'required="false"';
|
||||
$field_set[] = Indent::_(2) . "/>";
|
||||
// count the static field created
|
||||
$this->counter->field++;
|
||||
}
|
||||
// if ordering is not set
|
||||
if (!$this->fieldnames->isString($nameSingleCode . '.ordering'))
|
||||
{
|
||||
$field_set[] = Indent::_(2) . "<!--" . Line::_(__Line__, __Class__)
|
||||
. " Ordering Field. Type: Numbers (joomla) -->";
|
||||
$field_set[] = Indent::_(2) . "<field";
|
||||
$field_set[] = Indent::_(3) . 'name="ordering"';
|
||||
$field_set[] = Indent::_(3) . 'type="number"';
|
||||
$field_set[] = Indent::_(3) . 'class="inputbox validate-ordering"';
|
||||
$field_set[] = Indent::_(3) . 'label="' . $lang_view
|
||||
. '_ORDERING_LABEL' . '"';
|
||||
$field_set[] = Indent::_(3) . 'description=""';
|
||||
$field_set[] = Indent::_(3) . 'default="0"';
|
||||
$field_set[] = Indent::_(3) . 'size="6"';
|
||||
if ($read_only)
|
||||
{
|
||||
$field_set[] = $read_only;
|
||||
}
|
||||
$field_set[] = Indent::_(3) . 'required="false"';
|
||||
$field_set[] = Indent::_(2) . "/>";
|
||||
// count the static field created
|
||||
$this->counter->field++;
|
||||
}
|
||||
// if version is not set
|
||||
if (!$this->fieldnames->isString($nameSingleCode . '.version'))
|
||||
{
|
||||
$field_set[] = Indent::_(2) . "<!--" . Line::_(__Line__, __Class__)
|
||||
. " Version Field. Type: Text (joomla) -->";
|
||||
$field_set[] = Indent::_(2) . "<field";
|
||||
$field_set[] = Indent::_(3) . 'name="version"';
|
||||
$field_set[] = Indent::_(3) . 'type="text"';
|
||||
$field_set[] = Indent::_(3) . 'class="readonly"';
|
||||
$field_set[] = Indent::_(3) . 'label="' . $lang_view
|
||||
. '_VERSION_LABEL"';
|
||||
$field_set[] = Indent::_(3) . 'description="' . $lang_view
|
||||
. '_VERSION_DESC"';
|
||||
$field_set[] = Indent::_(3) . 'size="6"';
|
||||
$field_set[] = Indent::_(3) . 'readonly="true"';
|
||||
$field_set[] = Indent::_(3) . 'filter="unset"';
|
||||
$field_set[] = Indent::_(2) . "/>";
|
||||
// count the static field created
|
||||
$this->counter->field++;
|
||||
}
|
||||
// check if metadata is added to this view
|
||||
if ($this->metadata->isString($nameSingleCode))
|
||||
{
|
||||
// metakey
|
||||
if (!$this->fieldnames->isString($nameSingleCode . '.metakey'))
|
||||
{
|
||||
$field_set[] = Indent::_(2) . "<!--" . Line::_(__Line__, __Class__)
|
||||
. " Metakey Field. Type: Textarea (joomla) -->";
|
||||
$field_set[] = Indent::_(2) . "<field";
|
||||
$field_set[] = Indent::_(3) . 'name="metakey"';
|
||||
$field_set[] = Indent::_(3) . 'type="textarea"';
|
||||
$field_set[] = Indent::_(3)
|
||||
. 'label="JFIELD_META_KEYWORDS_LABEL"';
|
||||
$field_set[] = Indent::_(3)
|
||||
. 'description="JFIELD_META_KEYWORDS_DESC"';
|
||||
$field_set[] = Indent::_(3) . 'rows="3"';
|
||||
$field_set[] = Indent::_(3) . 'cols="30"';
|
||||
$field_set[] = Indent::_(2) . "/>";
|
||||
// count the static field created
|
||||
$this->counter->field++;
|
||||
}
|
||||
// metadesc
|
||||
if (!$this->fieldnames->isString($nameSingleCode . '.metadesc'))
|
||||
{
|
||||
$field_set[] = Indent::_(2) . "<!--" . Line::_(__Line__, __Class__)
|
||||
. " Metadesc Field. Type: Textarea (joomla) -->";
|
||||
$field_set[] = Indent::_(2) . "<field";
|
||||
$field_set[] = Indent::_(3) . 'name="metadesc"';
|
||||
$field_set[] = Indent::_(3) . 'type="textarea"';
|
||||
$field_set[] = Indent::_(3)
|
||||
. 'label="JFIELD_META_DESCRIPTION_LABEL"';
|
||||
$field_set[] = Indent::_(3)
|
||||
. 'description="JFIELD_META_DESCRIPTION_DESC"';
|
||||
$field_set[] = Indent::_(3) . 'rows="3"';
|
||||
$field_set[] = Indent::_(3) . 'cols="30"';
|
||||
$field_set[] = Indent::_(2) . "/>";
|
||||
// count the static field created
|
||||
$this->counter->field++;
|
||||
}
|
||||
}
|
||||
// fix the permissions field "title" issue gh-629
|
||||
// check if the title is not already set
|
||||
if (!$this->fieldnames->isString($nameSingleCode . '.title')
|
||||
&& $this->permission->check($view, $nameSingleCode))
|
||||
{
|
||||
// set the field/tab name
|
||||
$field_name = "title";
|
||||
$tab_name = "publishing";
|
||||
$field_set[] = Indent::_(2) . "<!--" . Line::_(__Line__, __Class__)
|
||||
. " Was added due to Permissions JS needing a Title field -->";
|
||||
$field_set[] = Indent::_(2) . "<!--" . Line::_(__Line__, __Class__)
|
||||
. " Let us know at gh-629 should this change -->";
|
||||
$field_set[] = Indent::_(2) . "<!--" . Line::_(__Line__, __Class__)
|
||||
. " https://github.com/vdm-io/Joomla-Component-Builder/issues/629#issuecomment-750117235 -->";
|
||||
// at this point we know that we must add a hidden title field
|
||||
// and make sure it does not get stored to the database
|
||||
$field_set[] = Indent::_(2) . "<field";
|
||||
$field_set[] = Indent::_(3) . "name=" . '"' . $field_name . '"';
|
||||
$field_set[] = Indent::_(3)
|
||||
. 'type="hidden"';
|
||||
$field_set[] = Indent::_(3) . 'default="' . $component . ' '
|
||||
. $nameSingleCode . '"';
|
||||
$field_set[] = Indent::_(2) . "/>";
|
||||
// count the static field created
|
||||
$this->counter->field++;
|
||||
// setup needed field values for layout
|
||||
$field_array = array();
|
||||
$field_array['order_edit'] = 0;
|
||||
$field_array['tab'] = 15;
|
||||
$field_array['alignment'] = 1;
|
||||
// make sure it gets added to view
|
||||
$this->layout->set(
|
||||
$nameSingleCode, $tab_name, $field_name, $field_array
|
||||
);
|
||||
}
|
||||
// load the dynamic fields now
|
||||
if (StringHelper::check($dynamic_fields))
|
||||
{
|
||||
$field_set[] = Indent::_(2) . "<!--" . Line::_(__Line__, __Class__)
|
||||
. " Dynamic Fields. -->" . $dynamic_fields;
|
||||
}
|
||||
// close fieldset
|
||||
$field_set[] = Indent::_(1) . "</fieldset>";
|
||||
// check if metadata is added to this view
|
||||
if ($this->metadata->isString($nameSingleCode))
|
||||
{
|
||||
if (!$this->fieldnames->isString($nameSingleCode . '.robots')
|
||||
|| !$this->fieldnames->isString($nameSingleCode . '.rights')
|
||||
|| !$this->fieldnames->isString($nameSingleCode . '.author'))
|
||||
{
|
||||
$field_set[] = PHP_EOL . Indent::_(1) . "<!--" . Line::_(
|
||||
__LINE__,__CLASS__
|
||||
) . " Metadata Fields. -->";
|
||||
$field_set[] = Indent::_(1) . "<fields"
|
||||
. ' name="metadata" label="JGLOBAL_FIELDSET_METADATA_OPTIONS">';
|
||||
$field_set[] = Indent::_(2) . '<fieldset name="vdmmetadata"';
|
||||
$field_set[] = Indent::_(3)
|
||||
. 'label="JGLOBAL_FIELDSET_METADATA_OPTIONS">';
|
||||
// robots
|
||||
if (!$this->fieldnames->isString($nameSingleCode . '.robots'))
|
||||
{
|
||||
$field_set[] = Indent::_(3) . "<!--" . Line::_(
|
||||
__LINE__,__CLASS__
|
||||
) . " Robots Field. Type: List (joomla) -->";
|
||||
$field_set[] = Indent::_(3) . '<field name="robots"';
|
||||
$field_set[] = Indent::_(4) . 'type="list"';
|
||||
$field_set[] = Indent::_(4)
|
||||
. 'label="JFIELD_METADATA_ROBOTS_LABEL"';
|
||||
$field_set[] = Indent::_(4)
|
||||
. 'description="JFIELD_METADATA_ROBOTS_DESC" >';
|
||||
$field_set[] = Indent::_(4)
|
||||
. '<option value="">JGLOBAL_USE_GLOBAL</option>';
|
||||
$field_set[] = Indent::_(4)
|
||||
. '<option value="index, follow">JGLOBAL_INDEX_FOLLOW</option>';
|
||||
$field_set[] = Indent::_(4)
|
||||
. '<option value="noindex, follow">JGLOBAL_NOINDEX_FOLLOW</option>';
|
||||
$field_set[] = Indent::_(4)
|
||||
. '<option value="index, nofollow">JGLOBAL_INDEX_NOFOLLOW</option>';
|
||||
$field_set[] = Indent::_(4)
|
||||
. '<option value="noindex, nofollow">JGLOBAL_NOINDEX_NOFOLLOW</option>';
|
||||
$field_set[] = Indent::_(3) . '</field>';
|
||||
// count the static field created
|
||||
$this->counter->field++;
|
||||
}
|
||||
// author
|
||||
if (!$this->fieldnames->isString($nameSingleCode . '.author'))
|
||||
{
|
||||
$field_set[] = Indent::_(3) . "<!--" . Line::_(
|
||||
__LINE__,__CLASS__
|
||||
) . " Author Field. Type: Text (joomla) -->";
|
||||
$field_set[] = Indent::_(3) . '<field name="author"';
|
||||
$field_set[] = Indent::_(4) . 'type="text"';
|
||||
$field_set[] = Indent::_(4)
|
||||
. 'label="JAUTHOR" description="JFIELD_METADATA_AUTHOR_DESC"';
|
||||
$field_set[] = Indent::_(4) . 'size="20"';
|
||||
$field_set[] = Indent::_(3) . "/>";
|
||||
// count the static field created
|
||||
$this->counter->field++;
|
||||
}
|
||||
// rights
|
||||
if (!$this->fieldnames->isString($nameSingleCode . '.rights'))
|
||||
{
|
||||
$field_set[] = Indent::_(3) . "<!--" . Line::_(
|
||||
__LINE__,__CLASS__
|
||||
) . " Rights Field. Type: Textarea (joomla) -->";
|
||||
$field_set[] = Indent::_(3)
|
||||
. '<field name="rights" type="textarea" label="JFIELD_META_RIGHTS_LABEL"';
|
||||
$field_set[] = Indent::_(4)
|
||||
. 'description="JFIELD_META_RIGHTS_DESC" required="false" filter="string"';
|
||||
$field_set[] = Indent::_(4) . 'cols="30" rows="2"';
|
||||
$field_set[] = Indent::_(3) . "/>";
|
||||
// count the static field created
|
||||
$this->counter->field++;
|
||||
}
|
||||
$field_set[] = Indent::_(2) . "</fieldset>";
|
||||
$field_set[] = Indent::_(1) . "</fields>";
|
||||
}
|
||||
}
|
||||
|
||||
// return the set
|
||||
return implode(PHP_EOL, $field_set);
|
||||
}
|
|
@ -0,0 +1,81 @@
|
|||
{
|
||||
"add_head": "0",
|
||||
"add_licensing_template": "2",
|
||||
"extends": "0",
|
||||
"guid": "05448890-e324-41a0-b6db-d804bfc241cc",
|
||||
"implements": [
|
||||
"d44f3294-6b68-4d85-a617-15fb772b7d14"
|
||||
],
|
||||
"load_selection": null,
|
||||
"name": "FieldsetString",
|
||||
"power_version": "1.0.0",
|
||||
"system_name": "JCB.Compiler.Creator.FieldsetString",
|
||||
"type": "final class",
|
||||
"use_selection": {
|
||||
"use_selection0": {
|
||||
"use": "fa4bf18e-301e-42e3-91fb-6e0096c07adc",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection1": {
|
||||
"use": "06453ada-e370-49f0-b262-e3f5a8ed0c2c",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection2": {
|
||||
"use": "4ad7020e-39ab-49ba-977b-de6084944502",
|
||||
"as": "Language"
|
||||
},
|
||||
"use_selection3": {
|
||||
"use": "20ed72b0-fcac-4344-aee1-8a65e3bf221d",
|
||||
"as": "Event"
|
||||
},
|
||||
"use_selection4": {
|
||||
"use": "a85451d3-a5c5-446a-90ae-0cf715a16d94",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection5": {
|
||||
"use": "4801f8b0-4a4a-4eda-8f0e-cf77f042c35e",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection6": {
|
||||
"use": "961a2a2e-9f95-4b5f-b1c0-62ee783f9c66",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection7": {
|
||||
"use": "e38a5276-6664-4bc6-8002-0562fcc248f8",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection8": {
|
||||
"use": "f052eeef-5112-4efe-98c8-8c7db69dc2d1",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection9": {
|
||||
"use": "a0f032db-2242-41df-8e4a-5e9e6f88201d",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection10": {
|
||||
"use": "e6d871a6-bbe7-497d-af01-68f6bb9a87f4",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection11": {
|
||||
"use": "a68c010b-e92e-47d5-8a44-d23cfddeb6c6",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection12": {
|
||||
"use": "4e6ff11d-bebf-42f5-8fd7-b2f882857222",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection13": {
|
||||
"use": "1f28cb53-60d9-4db1-b517-3c7dc6b429ef",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection14": {
|
||||
"use": "0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a",
|
||||
"as": "default"
|
||||
}
|
||||
},
|
||||
"namespace": "VDM\\Joomla\\Componentbuilder.Compiler.Creator.FieldsetString",
|
||||
"description": "Fieldset String Creator Class\r\n\r\n@since 3.2.0",
|
||||
"licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/joomla\/Component-Builder>\r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n",
|
||||
"head": "",
|
||||
"composer": ""
|
||||
}
|
|
@ -194,7 +194,7 @@ note left of Model::getModelCustombuttons
|
|||
end note
|
||||
|
||||
note right of Model::getModelLoader
|
||||
Get the Model Auto Loader
|
||||
Get The Model Loader Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: Loader
|
||||
|
|
|
@ -330,7 +330,8 @@ class Model implements ServiceProviderInterface
|
|||
{
|
||||
return new Dynamicget(
|
||||
$container->get('Config'),
|
||||
$container->get('Registry'),
|
||||
$container->get('Compiler.Builder.Site.Dynamic.Get'),
|
||||
$container->get('Compiler.Builder.Site.Main.Get'),
|
||||
$container->get('Customcode'),
|
||||
$container->get('Customcode.Gui'),
|
||||
$container->get('Placeholder'),
|
||||
|
@ -350,7 +351,7 @@ class Model implements ServiceProviderInterface
|
|||
{
|
||||
return new Libraries(
|
||||
$container->get('Config'),
|
||||
$container->get('Registry'),
|
||||
$container->get('Compiler.Builder.Library.Manager'),
|
||||
$container->get('Library.Data')
|
||||
);
|
||||
}
|
||||
|
@ -413,9 +414,10 @@ class Model implements ServiceProviderInterface
|
|||
{
|
||||
return new Mysqlsettings(
|
||||
$container->get('Config'),
|
||||
$container->get('Registry')
|
||||
$container->get('Compiler.Builder.Mysql.Table.Setting')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Sql Model
|
||||
*
|
||||
|
@ -443,7 +445,7 @@ class Model implements ServiceProviderInterface
|
|||
public function getModelCustomalias(Container $container): Customalias
|
||||
{
|
||||
return new Customalias(
|
||||
$container->get('Registry'),
|
||||
$container->get('Compiler.Builder.Custom.Alias'),
|
||||
$container->get('Field.Name')
|
||||
);
|
||||
}
|
||||
|
@ -460,7 +462,7 @@ class Model implements ServiceProviderInterface
|
|||
{
|
||||
return new Ajaxadmin(
|
||||
$container->get('Config'),
|
||||
$container->get('Registry'),
|
||||
$container->get('Compiler.Builder.Site.Edit.View'),
|
||||
$container->get('Customcode.Dispenser')
|
||||
);
|
||||
}
|
||||
|
@ -498,7 +500,7 @@ class Model implements ServiceProviderInterface
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the Model Auto Loader
|
||||
* Get The Model Loader Class.
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
|
@ -509,7 +511,10 @@ class Model implements ServiceProviderInterface
|
|||
{
|
||||
return new Loader(
|
||||
$container->get('Config'),
|
||||
$container->get('Registry')
|
||||
$container->get('Compiler.Builder.Footable.Scripts'),
|
||||
$container->get('Compiler.Builder.Google.Chart'),
|
||||
$container->get('Compiler.Builder.Get.Module'),
|
||||
$container->get('Compiler.Builder.Uikit.Comp')
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -586,9 +591,11 @@ class Model implements ServiceProviderInterface
|
|||
{
|
||||
return new Relations(
|
||||
$container->get('Config'),
|
||||
$container->get('Registry'),
|
||||
$container->get('Language'),
|
||||
$container->get('Customcode')
|
||||
$container->get('Customcode'),
|
||||
$container->get('Compiler.Builder.List.Join'),
|
||||
$container->get('Compiler.Builder.List.Head.Override'),
|
||||
$container->get('Compiler.Builder.Field.Relations')
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -604,7 +611,8 @@ class Model implements ServiceProviderInterface
|
|||
{
|
||||
return new Conditions(
|
||||
$container->get('Field.Type.Name'),
|
||||
$container->get('Field.Name')
|
||||
$container->get('Field.Name'),
|
||||
$container->get('Field.Groups')
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -625,6 +633,7 @@ class Model implements ServiceProviderInterface
|
|||
$container->get('Customcode'),
|
||||
$container->get('Field'),
|
||||
$container->get('Field.Name'),
|
||||
$container->get('Field.Groups'),
|
||||
$container->get('Model.Updatesql')
|
||||
);
|
||||
}
|
||||
|
@ -669,7 +678,7 @@ class Model implements ServiceProviderInterface
|
|||
{
|
||||
return new Customtabs(
|
||||
$container->get('Config'),
|
||||
$container->get('Registry'),
|
||||
$container->get('Compiler.Builder.Custom.Tabs'),
|
||||
$container->get('Language'),
|
||||
$container->get('Placeholder'),
|
||||
$container->get('Customcode')
|
||||
|
@ -687,9 +696,10 @@ class Model implements ServiceProviderInterface
|
|||
public function getModelAdminviews(Container $container): Adminviews
|
||||
{
|
||||
return new Adminviews(
|
||||
$container->get('Config'),
|
||||
$container->get('Adminview.Data'),
|
||||
$container->get('Registry'),
|
||||
$container->get('Config')
|
||||
$container->get('Compiler.Builder.Site.Edit.View'),
|
||||
$container->get('Compiler.Builder.Admin.Filter.Type')
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -803,6 +813,5 @@ class Model implements ServiceProviderInterface
|
|||
$container->get('Table')
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -266,7 +266,8 @@
|
|||
{
|
||||
return new Dynamicget(
|
||||
$container->get('Config'),
|
||||
$container->get('Registry'),
|
||||
$container->get('Compiler.Builder.Site.Dynamic.Get'),
|
||||
$container->get('Compiler.Builder.Site.Main.Get'),
|
||||
$container->get('Customcode'),
|
||||
$container->get('Customcode.Gui'),
|
||||
$container->get('Placeholder'),
|
||||
|
@ -286,7 +287,7 @@
|
|||
{
|
||||
return new Libraries(
|
||||
$container->get('Config'),
|
||||
$container->get('Registry'),
|
||||
$container->get('Compiler.Builder.Library.Manager'),
|
||||
$container->get('Library.Data')
|
||||
);
|
||||
}
|
||||
|
@ -349,9 +350,10 @@
|
|||
{
|
||||
return new Mysqlsettings(
|
||||
$container->get('Config'),
|
||||
$container->get('Registry')
|
||||
$container->get('Compiler.Builder.Mysql.Table.Setting')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Sql Model
|
||||
*
|
||||
|
@ -379,7 +381,7 @@
|
|||
public function getModelCustomalias(Container $container): Customalias
|
||||
{
|
||||
return new Customalias(
|
||||
$container->get('Registry'),
|
||||
$container->get('Compiler.Builder.Custom.Alias'),
|
||||
$container->get('Field.Name')
|
||||
);
|
||||
}
|
||||
|
@ -396,7 +398,7 @@
|
|||
{
|
||||
return new Ajaxadmin(
|
||||
$container->get('Config'),
|
||||
$container->get('Registry'),
|
||||
$container->get('Compiler.Builder.Site.Edit.View'),
|
||||
$container->get('Customcode.Dispenser')
|
||||
);
|
||||
}
|
||||
|
@ -434,7 +436,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the Model Auto Loader
|
||||
* Get The Model Loader Class.
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
|
@ -445,7 +447,10 @@
|
|||
{
|
||||
return new Loader(
|
||||
$container->get('Config'),
|
||||
$container->get('Registry')
|
||||
$container->get('Compiler.Builder.Footable.Scripts'),
|
||||
$container->get('Compiler.Builder.Google.Chart'),
|
||||
$container->get('Compiler.Builder.Get.Module'),
|
||||
$container->get('Compiler.Builder.Uikit.Comp')
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -522,9 +527,11 @@
|
|||
{
|
||||
return new Relations(
|
||||
$container->get('Config'),
|
||||
$container->get('Registry'),
|
||||
$container->get('Language'),
|
||||
$container->get('Customcode')
|
||||
$container->get('Customcode'),
|
||||
$container->get('Compiler.Builder.List.Join'),
|
||||
$container->get('Compiler.Builder.List.Head.Override'),
|
||||
$container->get('Compiler.Builder.Field.Relations')
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -540,7 +547,8 @@
|
|||
{
|
||||
return new Conditions(
|
||||
$container->get('Field.Type.Name'),
|
||||
$container->get('Field.Name')
|
||||
$container->get('Field.Name'),
|
||||
$container->get('Field.Groups')
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -561,6 +569,7 @@
|
|||
$container->get('Customcode'),
|
||||
$container->get('Field'),
|
||||
$container->get('Field.Name'),
|
||||
$container->get('Field.Groups'),
|
||||
$container->get('Model.Updatesql')
|
||||
);
|
||||
}
|
||||
|
@ -605,7 +614,7 @@
|
|||
{
|
||||
return new Customtabs(
|
||||
$container->get('Config'),
|
||||
$container->get('Registry'),
|
||||
$container->get('Compiler.Builder.Custom.Tabs'),
|
||||
$container->get('Language'),
|
||||
$container->get('Placeholder'),
|
||||
$container->get('Customcode')
|
||||
|
@ -623,9 +632,10 @@
|
|||
public function getModelAdminviews(Container $container): Adminviews
|
||||
{
|
||||
return new Adminviews(
|
||||
$container->get('Config'),
|
||||
$container->get('Adminview.Data'),
|
||||
$container->get('Registry'),
|
||||
$container->get('Config')
|
||||
$container->get('Compiler.Builder.Site.Edit.View'),
|
||||
$container->get('Compiler.Builder.Admin.Filter.Type')
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
```
|
||||
██████╗ ██████╗ ██╗ ██╗███████╗██████╗
|
||||
██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗
|
||||
██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝
|
||||
██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗
|
||||
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
|
||||
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
|
||||
```
|
||||
# final class HiddenFields (Details)
|
||||
> namespace: **VDM\Joomla\Componentbuilder\Compiler\Builder**
|
||||
> extends: **StorageRegistry**
|
||||
```uml
|
||||
@startuml
|
||||
class HiddenFields << (F,LightGreen) >> #RoyalBlue {
|
||||
}
|
||||
|
||||
@enduml
|
||||
```
|
||||
|
||||
---
|
||||
```
|
||||
██╗ ██████╗██████╗
|
||||
██║██╔════╝██╔══██╗
|
||||
██║██║ ██████╔╝
|
||||
██ ██║██║ ██╔══██╗
|
||||
╚█████╔╝╚██████╗██████╔╝
|
||||
╚════╝ ╚═════╝╚═════╝
|
||||
```
|
||||
> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
<?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
|
||||
*/
|
||||
|
||||
namespace VDM\Joomla\Componentbuilder\Compiler\Builder;
|
||||
|
||||
|
||||
use VDM\Joomla\Abstraction\StorageRegistry\Traits\ToString;
|
||||
use VDM\Joomla\Interfaces\Storageregistryinterface;
|
||||
use VDM\Joomla\Abstraction\StorageRegistry;
|
||||
|
||||
|
||||
/**
|
||||
* Hidden Fields Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class HiddenFields extends StorageRegistry implements Storageregistryinterface
|
||||
{
|
||||
/**
|
||||
* To String Values
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
use ToString;
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
/**
|
||||
* To String Values
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
use ToString;
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"add_head": "0",
|
||||
"add_licensing_template": "2",
|
||||
"extends": "7e822c03-1b20-41d1-9427-f5b8d5836af7",
|
||||
"guid": "0b45357f-b077-4337-92f3-65c1e19d36cd",
|
||||
"implements": [
|
||||
"64e291c2-11f1-423d-a44d-837cc12cc017"
|
||||
],
|
||||
"load_selection": null,
|
||||
"name": "HiddenFields",
|
||||
"power_version": "1.0.0",
|
||||
"system_name": "JCB.Compiler.Builder.HiddenFields",
|
||||
"type": "final class",
|
||||
"use_selection": {
|
||||
"use_selection0": {
|
||||
"use": "7d494d91-ab60-43cd-aecf-d50e07f7f30e",
|
||||
"as": "default"
|
||||
}
|
||||
},
|
||||
"namespace": "VDM\\Joomla\\Componentbuilder.Compiler.Builder.HiddenFields",
|
||||
"description": "Hidden Fields Builder Class\r\n\r\n@since 3.2.0",
|
||||
"licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/joomla\/Component-Builder>\r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n",
|
||||
"head": "",
|
||||
"composer": ""
|
||||
}
|
|
@ -18,18 +18,16 @@ class Readme #Gold {
|
|||
- readmeBuilder($powers) : string
|
||||
- readmeModel(array $classes) : string
|
||||
- generateIndex(array $classes) : string
|
||||
- generateDiagramBucket(array $classes) : string
|
||||
- defineTypeOrder() : array
|
||||
- sortClasses(array $classes, array $typeOrder) : void
|
||||
- compareNamespace(array $a, array $b) : int
|
||||
- compareType(array $a, array $b, ...) : int
|
||||
- compareName(array $a, array $b) : int
|
||||
- generateNamespaceDiagram(string $current_namespace, string $diagrams) : string
|
||||
- indexLinkPower(string $power) : string
|
||||
- linkPowerRepo(string $power) : string
|
||||
- linkPowerCode(string $power) : string
|
||||
- linkPowerSettings(string $power) : string
|
||||
- linkPowerGuid(string $power) : string
|
||||
- indexLinkPower(array $power) : string
|
||||
- linkPowerRepo(array $power) : string
|
||||
- linkPowerCode(array $power) : string
|
||||
- linkPowerSettings(array $power) : string
|
||||
- linkPowerSPK(array $power) : string
|
||||
}
|
||||
|
||||
note right of Readme::__construct
|
||||
|
@ -65,34 +63,28 @@ note right of Readme::generateIndex
|
|||
return: string
|
||||
end note
|
||||
|
||||
note left of Readme::generateDiagramBucket
|
||||
Generate the diagram bucket string for classes
|
||||
|
||||
return: string
|
||||
end note
|
||||
|
||||
note right of Readme::defineTypeOrder
|
||||
note left of Readme::defineTypeOrder
|
||||
Define the order of types for sorting purposes
|
||||
|
||||
since: 3.2.0
|
||||
return: array
|
||||
end note
|
||||
|
||||
note left of Readme::sortClasses
|
||||
note right of Readme::sortClasses
|
||||
Sort the flattened array using a single sorting function
|
||||
|
||||
since: 3.2.0
|
||||
return: void
|
||||
end note
|
||||
|
||||
note right of Readme::compareNamespace
|
||||
note left of Readme::compareNamespace
|
||||
Compare the namespace of two classes
|
||||
|
||||
since: 3.2.0
|
||||
return: int
|
||||
end note
|
||||
|
||||
note left of Readme::compareType
|
||||
note right of Readme::compareType
|
||||
Compare the type of two classes
|
||||
|
||||
since: 3.2.0
|
||||
|
@ -104,19 +96,13 @@ note left of Readme::compareType
|
|||
array $typeOrder
|
||||
end note
|
||||
|
||||
note right of Readme::compareName
|
||||
note left of Readme::compareName
|
||||
Compare the name of two classes
|
||||
|
||||
since: 3.2.0
|
||||
return: int
|
||||
end note
|
||||
|
||||
note left of Readme::generateNamespaceDiagram
|
||||
Generate a namespace diagram string
|
||||
|
||||
return: string
|
||||
end note
|
||||
|
||||
note right of Readme::indexLinkPower
|
||||
Build the Link to the power in this repository
|
||||
|
||||
|
@ -145,8 +131,8 @@ note left of Readme::linkPowerSettings
|
|||
return: string
|
||||
end note
|
||||
|
||||
note right of Readme::linkPowerGuid
|
||||
Build the Link with GUID text to the power in this repository
|
||||
note right of Readme::linkPowerSPK
|
||||
Get the SuperPowerKey (SPK)
|
||||
|
||||
since: 3.2.0
|
||||
return: string
|
||||
|
|
|
@ -122,20 +122,15 @@ class Readme
|
|||
{
|
||||
$classes = [];
|
||||
foreach ($powers as $guid => $power)
|
||||
{
|
||||
$power_object = $this->power->get($guid);
|
||||
if (isset($power_object->parsed_class_code) && is_array($power_object->parsed_class_code))
|
||||
{
|
||||
// add to the sort bucket
|
||||
$classes[] = [
|
||||
'namespace' => $power['namespace'],
|
||||
'type' => $power['type'],
|
||||
'name' => $power['name'],
|
||||
'link' => $this->indexLinkPower($power),
|
||||
'diagram' => $this->plantuml->classBasicDiagram($power, $power_object->parsed_class_code)
|
||||
'link' => $this->indexLinkPower($power)
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
return $this->readmeModel($classes);
|
||||
}
|
||||
|
@ -152,11 +147,7 @@ class Readme
|
|||
{
|
||||
$this->sortClasses($classes, $this->defineTypeOrder());
|
||||
|
||||
$result = $this->generateIndex($classes);
|
||||
|
||||
$diagram_bucket = $this->generateDiagramBucket($classes);
|
||||
|
||||
return $result . $diagram_bucket;
|
||||
return $this->generateIndex($classes);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -187,40 +178,6 @@ class Readme
|
|||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate the diagram bucket string for classes
|
||||
*
|
||||
* @param array $classes The sorted classes
|
||||
*
|
||||
* @return string The diagram bucket string
|
||||
*/
|
||||
private function generateDiagramBucket(array &$classes): string
|
||||
{
|
||||
$diagram_bucket = "\n\n# Class Diagrams\n";
|
||||
$current_namespace = null;
|
||||
$diagrams = '';
|
||||
|
||||
foreach ($classes as $class)
|
||||
{
|
||||
if ($class['namespace'] !== $current_namespace)
|
||||
{
|
||||
if ($current_namespace !== null)
|
||||
{
|
||||
$diagram_bucket .= $this->generateNamespaceDiagram($current_namespace, $diagrams);
|
||||
}
|
||||
$current_namespace = $class['namespace'];
|
||||
$diagrams = '';
|
||||
}
|
||||
|
||||
$diagrams .= $class['diagram'];
|
||||
}
|
||||
|
||||
// Add the last namespace diagram
|
||||
$diagram_bucket .= $this->generateNamespaceDiagram($current_namespace, $diagrams);
|
||||
|
||||
return $diagram_bucket;
|
||||
}
|
||||
|
||||
/**
|
||||
* Define the order of types for sorting purposes
|
||||
*
|
||||
|
@ -301,7 +258,7 @@ class Readme
|
|||
*/
|
||||
private function compareType(array $a, array $b, array $typeOrder): int
|
||||
{
|
||||
return $typeOrder[$a['type']] - $typeOrder[$b['type']];
|
||||
return $typeOrder[$a['type']] <=> $typeOrder[$b['type']];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -318,92 +275,79 @@ class Readme
|
|||
return strcmp($a['name'], $b['name']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a namespace diagram string
|
||||
*
|
||||
* @param string $current_namespace The current namespace
|
||||
* @param string $diagrams The diagrams for the namespace
|
||||
*
|
||||
* @return string The namespace diagram string
|
||||
*/
|
||||
private function generateNamespaceDiagram(string $current_namespace, string $diagrams): string
|
||||
{
|
||||
$namespace_title = str_replace('\\', ' ', $current_namespace);
|
||||
$diagram_code = "\n## {$namespace_title}\n> namespace {$current_namespace}\n";
|
||||
$diagram_code .= "```uml\n@startuml\n\n" .
|
||||
$this->plantuml->namespaceDiagram($current_namespace, $diagrams) . "\n\n@enduml\n```\n";
|
||||
|
||||
return $diagram_code;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the Link to the power in this repository
|
||||
*
|
||||
* @param string $power The power details.
|
||||
* @param array $power The power details.
|
||||
*
|
||||
* @return string
|
||||
* @since 3.2.0
|
||||
*/
|
||||
private function indexLinkPower(array &$power): string
|
||||
{
|
||||
return '**' . $power['type'] . ' ' . $power['name'] . "** | "
|
||||
$type = $power['type'] ?? 'error';
|
||||
$name = $power['name'] ?? 'error';
|
||||
return '**' . $type . ' ' . $name . "** | "
|
||||
. $this->linkPowerRepo($power) . ' | '
|
||||
. $this->linkPowerCode($power) . ' | '
|
||||
. $this->linkPowerSettings($power) . ' | '
|
||||
. $this->linkPowerGuid($power);
|
||||
. $this->linkPowerSPK($power);
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the Link to the power in this repository
|
||||
*
|
||||
* @param string $power The power details.
|
||||
* @param array $power The power details.
|
||||
*
|
||||
* @return string
|
||||
* @since 3.2.0
|
||||
*/
|
||||
private function linkPowerRepo(array &$power): string
|
||||
{
|
||||
return '[Details](' . $power['path'] . ')';
|
||||
$path = $power['path'] ?? 'error';
|
||||
return '[Details](' . $path . ')';
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the Link to the power settings in this repository
|
||||
*
|
||||
* @param string $power The power details.
|
||||
* @param array $power The power details.
|
||||
*
|
||||
* @return string
|
||||
* @since 3.2.0
|
||||
*/
|
||||
private function linkPowerCode(array &$power): string
|
||||
{
|
||||
return '[Code](' . $power['code'] . ')';
|
||||
$code = $power['code'] ?? 'error';
|
||||
return '[Code](' . $code . ')';
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the Link to the power settings in this repository
|
||||
*
|
||||
* @param string $power The power details.
|
||||
* @param array $power The power details.
|
||||
*
|
||||
* @return string
|
||||
* @since 3.2.0
|
||||
*/
|
||||
private function linkPowerSettings(array &$power): string
|
||||
{
|
||||
return '[Settings](' . $power['settings'] . ')';
|
||||
$settings = $power['settings'] ?? 'error';
|
||||
return '[Settings](' . $settings . ')';
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the Link with GUID text to the power in this repository
|
||||
* Get the SuperPowerKey (SPK)
|
||||
*
|
||||
* @param string $power The power details.
|
||||
* @param array $power The power details.
|
||||
*
|
||||
* @return string
|
||||
* @since 3.2.0
|
||||
*/
|
||||
private function linkPowerGuid(array &$power): string
|
||||
private function linkPowerSPK(array &$power): string
|
||||
{
|
||||
return '[' . $power['guid'] . '](' . $power['path'] . ')';
|
||||
}
|
||||
|
||||
$spk = $power['spk'] ?? 'error';
|
||||
return $spk;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -97,20 +97,15 @@
|
|||
{
|
||||
$classes = [];
|
||||
foreach ($powers as $guid => $power)
|
||||
{
|
||||
$power_object = $this->power->get($guid);
|
||||
if (isset($power_object->parsed_class_code) && is_array($power_object->parsed_class_code))
|
||||
{
|
||||
// add to the sort bucket
|
||||
$classes[] = [
|
||||
'namespace' => $power['namespace'],
|
||||
'type' => $power['type'],
|
||||
'name' => $power['name'],
|
||||
'link' => $this->indexLinkPower($power),
|
||||
'diagram' => $this->plantuml->classBasicDiagram($power, $power_object->parsed_class_code)
|
||||
'link' => $this->indexLinkPower($power)
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
return $this->readmeModel($classes);
|
||||
}
|
||||
|
@ -127,11 +122,7 @@
|
|||
{
|
||||
$this->sortClasses($classes, $this->defineTypeOrder());
|
||||
|
||||
$result = $this->generateIndex($classes);
|
||||
|
||||
$diagram_bucket = $this->generateDiagramBucket($classes);
|
||||
|
||||
return $result . $diagram_bucket;
|
||||
return $this->generateIndex($classes);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -162,40 +153,6 @@
|
|||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate the diagram bucket string for classes
|
||||
*
|
||||
* @param array $classes The sorted classes
|
||||
*
|
||||
* @return string The diagram bucket string
|
||||
*/
|
||||
private function generateDiagramBucket(array &$classes): string
|
||||
{
|
||||
$diagram_bucket = "\n\n# Class Diagrams\n";
|
||||
$current_namespace = null;
|
||||
$diagrams = '';
|
||||
|
||||
foreach ($classes as $class)
|
||||
{
|
||||
if ($class['namespace'] !== $current_namespace)
|
||||
{
|
||||
if ($current_namespace !== null)
|
||||
{
|
||||
$diagram_bucket .= $this->generateNamespaceDiagram($current_namespace, $diagrams);
|
||||
}
|
||||
$current_namespace = $class['namespace'];
|
||||
$diagrams = '';
|
||||
}
|
||||
|
||||
$diagrams .= $class['diagram'];
|
||||
}
|
||||
|
||||
// Add the last namespace diagram
|
||||
$diagram_bucket .= $this->generateNamespaceDiagram($current_namespace, $diagrams);
|
||||
|
||||
return $diagram_bucket;
|
||||
}
|
||||
|
||||
/**
|
||||
* Define the order of types for sorting purposes
|
||||
*
|
||||
|
@ -276,7 +233,7 @@
|
|||
*/
|
||||
private function compareType(array $a, array $b, array $typeOrder): int
|
||||
{
|
||||
return $typeOrder[$a['type']] - $typeOrder[$b['type']];
|
||||
return $typeOrder[$a['type']] <=> $typeOrder[$b['type']];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -293,89 +250,77 @@
|
|||
return strcmp($a['name'], $b['name']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a namespace diagram string
|
||||
*
|
||||
* @param string $current_namespace The current namespace
|
||||
* @param string $diagrams The diagrams for the namespace
|
||||
*
|
||||
* @return string The namespace diagram string
|
||||
*/
|
||||
private function generateNamespaceDiagram(string $current_namespace, string $diagrams): string
|
||||
{
|
||||
$namespace_title = str_replace('\\', ' ', $current_namespace);
|
||||
$diagram_code = "\n## {$namespace_title}\n> namespace {$current_namespace}\n";
|
||||
$diagram_code .= "```uml\n@startuml\n\n" .
|
||||
$this->plantuml->namespaceDiagram($current_namespace, $diagrams) . "\n\n@enduml\n```\n";
|
||||
|
||||
return $diagram_code;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the Link to the power in this repository
|
||||
*
|
||||
* @param string $power The power details.
|
||||
* @param array $power The power details.
|
||||
*
|
||||
* @return string
|
||||
* @since 3.2.0
|
||||
*/
|
||||
private function indexLinkPower(array &$power): string
|
||||
{
|
||||
return '**' . $power['type'] . ' ' . $power['name'] . "** | "
|
||||
$type = $power['type'] ?? 'error';
|
||||
$name = $power['name'] ?? 'error';
|
||||
return '**' . $type . ' ' . $name . "** | "
|
||||
. $this->linkPowerRepo($power) . ' | '
|
||||
. $this->linkPowerCode($power) . ' | '
|
||||
. $this->linkPowerSettings($power) . ' | '
|
||||
. $this->linkPowerGuid($power);
|
||||
. $this->linkPowerSPK($power);
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the Link to the power in this repository
|
||||
*
|
||||
* @param string $power The power details.
|
||||
* @param array $power The power details.
|
||||
*
|
||||
* @return string
|
||||
* @since 3.2.0
|
||||
*/
|
||||
private function linkPowerRepo(array &$power): string
|
||||
{
|
||||
return '[Details](' . $power['path'] . ')';
|
||||
$path = $power['path'] ?? 'error';
|
||||
return '[Details](' . $path . ')';
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the Link to the power settings in this repository
|
||||
*
|
||||
* @param string $power The power details.
|
||||
* @param array $power The power details.
|
||||
*
|
||||
* @return string
|
||||
* @since 3.2.0
|
||||
*/
|
||||
private function linkPowerCode(array &$power): string
|
||||
{
|
||||
return '[Code](' . $power['code'] . ')';
|
||||
$code = $power['code'] ?? 'error';
|
||||
return '[Code](' . $code . ')';
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the Link to the power settings in this repository
|
||||
*
|
||||
* @param string $power The power details.
|
||||
* @param array $power The power details.
|
||||
*
|
||||
* @return string
|
||||
* @since 3.2.0
|
||||
*/
|
||||
private function linkPowerSettings(array &$power): string
|
||||
{
|
||||
return '[Settings](' . $power['settings'] . ')';
|
||||
$settings = $power['settings'] ?? 'error';
|
||||
return '[Settings](' . $settings . ')';
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the Link with GUID text to the power in this repository
|
||||
* Get the SuperPowerKey (SPK)
|
||||
*
|
||||
* @param string $power The power details.
|
||||
* @param array $power The power details.
|
||||
*
|
||||
* @return string
|
||||
* @since 3.2.0
|
||||
*/
|
||||
private function linkPowerGuid(array &$power): string
|
||||
private function linkPowerSPK(array &$power): string
|
||||
{
|
||||
return '[' . $power['guid'] . '](' . $power['path'] . ')';
|
||||
$spk = $power['spk'] ?? 'error';
|
||||
return $spk;
|
||||
}
|
|
@ -12,8 +12,11 @@
|
|||
@startuml
|
||||
class Loader #Gold {
|
||||
# Config $config
|
||||
# Registry $registry
|
||||
+ __construct(?Config $config = null, ?Registry $registry = null)
|
||||
# FootableScripts $footablescripts
|
||||
# GoogleChart $googlechart
|
||||
# GetModule $getmodule
|
||||
# UikitComp $uikitcomp
|
||||
+ __construct(Config $config, FootableScripts $footablescripts, ...)
|
||||
+ set(string $key, string $content, ...) : void
|
||||
+ uikit(string $key, string $content) : void
|
||||
# getFootableScripts(string $content) : bool
|
||||
|
@ -22,9 +25,16 @@ class Loader #Gold {
|
|||
}
|
||||
|
||||
note right of Loader::__construct
|
||||
Constructor
|
||||
Constructor.
|
||||
|
||||
since: 3.2.0
|
||||
|
||||
arguments:
|
||||
Config $config
|
||||
FootableScripts $footablescripts
|
||||
GoogleChart $googlechart
|
||||
GetModule $getmodule
|
||||
UikitComp $uikitcomp
|
||||
end note
|
||||
|
||||
note right of Loader::set
|
||||
|
|
|
@ -12,9 +12,11 @@
|
|||
namespace VDM\Joomla\Componentbuilder\Compiler\Model;
|
||||
|
||||
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Factory as Compiler;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Config;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Registry;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Builder\FootableScripts;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Builder\GoogleChart;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Builder\GetModule;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Builder\UikitComp;
|
||||
use VDM\Joomla\Utilities\Component\Helper;
|
||||
|
||||
|
||||
|
@ -26,7 +28,7 @@ use VDM\Joomla\Utilities\Component\Helper;
|
|||
class Loader
|
||||
{
|
||||
/**
|
||||
* Compiler Config
|
||||
* The Config Class.
|
||||
*
|
||||
* @var Config
|
||||
* @since 3.2.0
|
||||
|
@ -34,25 +36,56 @@ class Loader
|
|||
protected Config $config;
|
||||
|
||||
/**
|
||||
* The compiler registry
|
||||
* The FootableScripts Class.
|
||||
*
|
||||
* @var Registry
|
||||
* @var FootableScripts
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Registry $registry;
|
||||
protected FootableScripts $footablescripts;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* The GoogleChart Class.
|
||||
*
|
||||
* @param Config|null $config The compiler config object.
|
||||
* @param Registry|null $registry The compiler registry object.
|
||||
* @var GoogleChart
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected GoogleChart $googlechart;
|
||||
|
||||
/**
|
||||
* The GetModule Class.
|
||||
*
|
||||
* @var GetModule
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected GetModule $getmodule;
|
||||
|
||||
/**
|
||||
* The UikitComp Class.
|
||||
*
|
||||
* @var UikitComp
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected UikitComp $uikitcomp;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param Config $config The Config Class.
|
||||
* @param FootableScripts $footablescripts The FootableScripts Class.
|
||||
* @param GoogleChart $googlechart The GoogleChart Class.
|
||||
* @param GetModule $getmodule The GetModule Class.
|
||||
* @param UikitComp $uikitcomp The UikitComp Class.
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function __construct(?Config $config = null, ?Registry $registry = null)
|
||||
public function __construct(Config $config, FootableScripts $footablescripts,
|
||||
GoogleChart $googlechart, GetModule $getmodule, UikitComp $uikitcomp)
|
||||
{
|
||||
$this->config = $config ?: Compiler::_('Config');
|
||||
$this->registry = $registry ?: Compiler::_('Registry');
|
||||
$this->config = $config;
|
||||
$this->footablescripts = $footablescripts;
|
||||
$this->googlechart = $googlechart;
|
||||
$this->getmodule = $getmodule;
|
||||
$this->uikitcomp = $uikitcomp;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -71,39 +104,33 @@ class Loader
|
|||
$target = $target ?: $this->config->build_target;
|
||||
|
||||
// check for footable
|
||||
if (!$this->registry->
|
||||
exists('builder.footable_scripts.' . $target . '.' . $key))
|
||||
if (!$this->footablescripts->exists($target . '.' . $key))
|
||||
{
|
||||
if ($this->getFootableScripts($content))
|
||||
{
|
||||
$this->registry->
|
||||
set('builder.footable_scripts.' . $target . '.' . $key, true);
|
||||
$this->footablescripts->set($target . '.' . $key, true);
|
||||
|
||||
$this->config->set('footable', true);
|
||||
}
|
||||
}
|
||||
|
||||
// check for google chart
|
||||
if (!$this->registry->
|
||||
exists('builder.google_chart.' . $target . '.' . $key))
|
||||
if (!$this->googlechart->exists($target . '.' . $key))
|
||||
{
|
||||
if ($this->getGoogleChart($content))
|
||||
{
|
||||
$this->registry->
|
||||
set('builder.google_chart.' . $target . '.' . $key, true);
|
||||
$this->googlechart->set($target . '.' . $key, true);
|
||||
|
||||
$this->config->set('google_chart', true);
|
||||
}
|
||||
}
|
||||
|
||||
// check for get module
|
||||
if (!$this->registry->
|
||||
exists('builder.get_module.' . $target . '.' . $key))
|
||||
if (!$this->getmodule->exists($target . '.' . $key))
|
||||
{
|
||||
if ($this->getGetModule($content))
|
||||
{
|
||||
$this->registry->
|
||||
set('builder.get_module.' . $target . '.' . $key, true);
|
||||
$this->getmodule->set($target . '.' . $key, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -134,10 +161,10 @@ class Loader
|
|||
{
|
||||
// set uikit to views TODO: convert this getUikitComp to a class
|
||||
if (($found = Helper::_('getUikitComp',
|
||||
[$content, (array) $this->registry->get('builder.uikit_comp.' . $key, [])]
|
||||
[$content, $this->uikitcomp->get($key, [])]
|
||||
)) !== false)
|
||||
{
|
||||
$this->registry->set('builder.uikit_comp.' . $key, $found);
|
||||
$this->uikitcomp->set($key, $found);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -180,6 +207,5 @@ class Loader
|
|||
{
|
||||
return strpos($content, 'Chartbuilder(') !== false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* Compiler Config
|
||||
* The Config Class.
|
||||
*
|
||||
* @var Config
|
||||
* @since 3.2.0
|
||||
|
@ -7,25 +7,56 @@
|
|||
protected Config $config;
|
||||
|
||||
/**
|
||||
* The compiler registry
|
||||
* The FootableScripts Class.
|
||||
*
|
||||
* @var Registry
|
||||
* @var FootableScripts
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Registry $registry;
|
||||
protected FootableScripts $footablescripts;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* The GoogleChart Class.
|
||||
*
|
||||
* @param Config|null $config The compiler config object.
|
||||
* @param Registry|null $registry The compiler registry object.
|
||||
* @var GoogleChart
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected GoogleChart $googlechart;
|
||||
|
||||
/**
|
||||
* The GetModule Class.
|
||||
*
|
||||
* @var GetModule
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected GetModule $getmodule;
|
||||
|
||||
/**
|
||||
* The UikitComp Class.
|
||||
*
|
||||
* @var UikitComp
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected UikitComp $uikitcomp;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param Config $config The Config Class.
|
||||
* @param FootableScripts $footablescripts The FootableScripts Class.
|
||||
* @param GoogleChart $googlechart The GoogleChart Class.
|
||||
* @param GetModule $getmodule The GetModule Class.
|
||||
* @param UikitComp $uikitcomp The UikitComp Class.
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function __construct(?Config $config = null, ?Registry $registry = null)
|
||||
public function __construct(Config $config, FootableScripts $footablescripts,
|
||||
GoogleChart $googlechart, GetModule $getmodule, UikitComp $uikitcomp)
|
||||
{
|
||||
$this->config = $config ?: Compiler::_('Config');
|
||||
$this->registry = $registry ?: Compiler::_('Registry');
|
||||
$this->config = $config;
|
||||
$this->footablescripts = $footablescripts;
|
||||
$this->googlechart = $googlechart;
|
||||
$this->getmodule = $getmodule;
|
||||
$this->uikitcomp = $uikitcomp;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -44,39 +75,33 @@
|
|||
$target = $target ?: $this->config->build_target;
|
||||
|
||||
// check for footable
|
||||
if (!$this->registry->
|
||||
exists('builder.footable_scripts.' . $target . '.' . $key))
|
||||
if (!$this->footablescripts->exists($target . '.' . $key))
|
||||
{
|
||||
if ($this->getFootableScripts($content))
|
||||
{
|
||||
$this->registry->
|
||||
set('builder.footable_scripts.' . $target . '.' . $key, true);
|
||||
$this->footablescripts->set($target . '.' . $key, true);
|
||||
|
||||
$this->config->set('footable', true);
|
||||
}
|
||||
}
|
||||
|
||||
// check for google chart
|
||||
if (!$this->registry->
|
||||
exists('builder.google_chart.' . $target . '.' . $key))
|
||||
if (!$this->googlechart->exists($target . '.' . $key))
|
||||
{
|
||||
if ($this->getGoogleChart($content))
|
||||
{
|
||||
$this->registry->
|
||||
set('builder.google_chart.' . $target . '.' . $key, true);
|
||||
$this->googlechart->set($target . '.' . $key, true);
|
||||
|
||||
$this->config->set('google_chart', true);
|
||||
}
|
||||
}
|
||||
|
||||
// check for get module
|
||||
if (!$this->registry->
|
||||
exists('builder.get_module.' . $target . '.' . $key))
|
||||
if (!$this->getmodule->exists($target . '.' . $key))
|
||||
{
|
||||
if ($this->getGetModule($content))
|
||||
{
|
||||
$this->registry->
|
||||
set('builder.get_module.' . $target . '.' . $key, true);
|
||||
$this->getmodule->set($target . '.' . $key, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -107,10 +132,10 @@
|
|||
{
|
||||
// set uikit to views TODO: convert this getUikitComp to a class
|
||||
if (($found = Helper::_('getUikitComp',
|
||||
[$content, (array) $this->registry->get('builder.uikit_comp.' . $key, [])]
|
||||
[$content, $this->uikitcomp->get($key, [])]
|
||||
)) !== false)
|
||||
{
|
||||
$this->registry->set('builder.uikit_comp.' . $key, $found);
|
||||
$this->uikitcomp->set($key, $found);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,18 +11,26 @@
|
|||
"type": "class",
|
||||
"use_selection": {
|
||||
"use_selection0": {
|
||||
"use": "d910d8b8-4c23-4f3e-8cda-438f2d2bd7ac",
|
||||
"as": "Compiler"
|
||||
},
|
||||
"use_selection1": {
|
||||
"use": "fa4bf18e-301e-42e3-91fb-6e0096c07adc",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection1": {
|
||||
"use": "dba0776e-e582-4f73-af3e-e7ed17bc34b3",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection2": {
|
||||
"use": "e5d9804f-0eb0-4ee9-b406-ad4e8cdbc1f6",
|
||||
"use": "507ab90f-7d64-4697-9815-d96f5d1d1185",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection3": {
|
||||
"use": "c7b6f0d5-ec47-4166-915c-e78d49b4fb63",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection4": {
|
||||
"use": "54ec57f6-2fc3-42e5-975e-1fabeacb845d",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection5": {
|
||||
"use": "640b5352-fb09-425f-a26e-cd44eda03f15",
|
||||
"as": "default"
|
||||
}
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
```
|
||||
██████╗ ██████╗ ██╗ ██╗███████╗██████╗
|
||||
██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗
|
||||
██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝
|
||||
██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗
|
||||
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
|
||||
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
|
||||
```
|
||||
# final class DatabaseKeys (Details)
|
||||
> namespace: **VDM\Joomla\Componentbuilder\Compiler\Builder**
|
||||
> extends: **StorageRegistry**
|
||||
```uml
|
||||
@startuml
|
||||
class DatabaseKeys << (F,LightGreen) >> #RoyalBlue {
|
||||
}
|
||||
|
||||
@enduml
|
||||
```
|
||||
|
||||
---
|
||||
```
|
||||
██╗ ██████╗██████╗
|
||||
██║██╔════╝██╔══██╗
|
||||
██║██║ ██████╔╝
|
||||
██ ██║██║ ██╔══██╗
|
||||
╚█████╔╝╚██████╗██████╔╝
|
||||
╚════╝ ╚═════╝╚═════╝
|
||||
```
|
||||
> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
<?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
|
||||
*/
|
||||
|
||||
namespace VDM\Joomla\Componentbuilder\Compiler\Builder;
|
||||
|
||||
|
||||
use VDM\Joomla\Interfaces\Storageregistryinterface;
|
||||
use VDM\Joomla\Abstraction\StorageRegistry;
|
||||
|
||||
|
||||
/**
|
||||
* Database Keys Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class DatabaseKeys extends StorageRegistry implements Storageregistryinterface
|
||||
{
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
###CODEPOWER###
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"add_head": "0",
|
||||
"add_licensing_template": "2",
|
||||
"extends": "7e822c03-1b20-41d1-9427-f5b8d5836af7",
|
||||
"guid": "0d8db719-39a6-48b4-85a6-2f97e784e588",
|
||||
"implements": [
|
||||
"64e291c2-11f1-423d-a44d-837cc12cc017"
|
||||
],
|
||||
"load_selection": null,
|
||||
"name": "DatabaseKeys",
|
||||
"power_version": "1.0.0",
|
||||
"system_name": "JCB.Compiler.Builder.DatabaseKeys",
|
||||
"type": "final class",
|
||||
"use_selection": null,
|
||||
"namespace": "VDM\\Joomla\\Componentbuilder.Compiler.Builder.DatabaseKeys",
|
||||
"description": "Database Keys Builder Class\r\n\r\n@since 3.2.0",
|
||||
"licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/joomla\/Component-Builder>\r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n",
|
||||
"head": "",
|
||||
"composer": ""
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
```
|
||||
██████╗ ██████╗ ██╗ ██╗███████╗██████╗
|
||||
██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗
|
||||
██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝
|
||||
██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗
|
||||
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
|
||||
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
|
||||
```
|
||||
# final class DoNotEscape (Details)
|
||||
> namespace: **VDM\Joomla\Componentbuilder\Compiler\Builder**
|
||||
> extends: **StorageRegistry**
|
||||
```uml
|
||||
@startuml
|
||||
class DoNotEscape << (F,LightGreen) >> #RoyalBlue {
|
||||
}
|
||||
|
||||
@enduml
|
||||
```
|
||||
|
||||
---
|
||||
```
|
||||
██╗ ██████╗██████╗
|
||||
██║██╔════╝██╔══██╗
|
||||
██║██║ ██████╔╝
|
||||
██ ██║██║ ██╔══██╗
|
||||
╚█████╔╝╚██████╗██████╔╝
|
||||
╚════╝ ╚═════╝╚═════╝
|
||||
```
|
||||
> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
<?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
|
||||
*/
|
||||
|
||||
namespace VDM\Joomla\Componentbuilder\Compiler\Builder;
|
||||
|
||||
|
||||
use VDM\Joomla\Interfaces\Storageregistryinterface;
|
||||
use VDM\Joomla\Abstraction\StorageRegistry;
|
||||
|
||||
|
||||
/**
|
||||
* Do Not Escape Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class DoNotEscape extends StorageRegistry implements Storageregistryinterface
|
||||
{
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
###CODEPOWER###
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"add_head": "0",
|
||||
"add_licensing_template": "2",
|
||||
"extends": "7e822c03-1b20-41d1-9427-f5b8d5836af7",
|
||||
"guid": "0d9d3294-0bed-4c44-b1a1-e172f62cafb2",
|
||||
"implements": [
|
||||
"64e291c2-11f1-423d-a44d-837cc12cc017"
|
||||
],
|
||||
"load_selection": null,
|
||||
"name": "DoNotEscape",
|
||||
"power_version": "1.0.0",
|
||||
"system_name": "JCB.Compiler.Builder.DoNotEscape",
|
||||
"type": "final class",
|
||||
"use_selection": null,
|
||||
"namespace": "VDM\\Joomla\\Componentbuilder.Compiler.Builder.DoNotEscape",
|
||||
"description": "Do Not Escape Builder Class\r\n\r\n@since 3.2.0",
|
||||
"licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/joomla\/Component-Builder>\r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n",
|
||||
"head": "",
|
||||
"composer": ""
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
```
|
||||
██████╗ ██████╗ ██╗ ██╗███████╗██████╗
|
||||
██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗
|
||||
██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝
|
||||
██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗
|
||||
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
|
||||
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
|
||||
```
|
||||
# final class NewPublishingFields (Details)
|
||||
> namespace: **VDM\Joomla\Componentbuilder\Compiler\Builder**
|
||||
> extends: **StorageRegistry**
|
||||
```uml
|
||||
@startuml
|
||||
class NewPublishingFields << (F,LightGreen) >> #RoyalBlue {
|
||||
}
|
||||
|
||||
@enduml
|
||||
```
|
||||
|
||||
---
|
||||
```
|
||||
██╗ ██████╗██████╗
|
||||
██║██╔════╝██╔══██╗
|
||||
██║██║ ██████╔╝
|
||||
██ ██║██║ ██╔══██╗
|
||||
╚█████╔╝╚██████╗██████╔╝
|
||||
╚════╝ ╚═════╝╚═════╝
|
||||
```
|
||||
> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
<?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
|
||||
*/
|
||||
|
||||
namespace VDM\Joomla\Componentbuilder\Compiler\Builder;
|
||||
|
||||
|
||||
use VDM\Joomla\Abstraction\StorageRegistry\Traits\Count;
|
||||
use VDM\Joomla\Interfaces\Storageregistryinterface;
|
||||
use VDM\Joomla\Abstraction\StorageRegistry;
|
||||
|
||||
|
||||
/**
|
||||
* New Publishing Fields Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class NewPublishingFields extends StorageRegistry implements Storageregistryinterface
|
||||
{
|
||||
/**
|
||||
* Count Values
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
use Count;
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
/**
|
||||
* Count Values
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
use Count;
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"add_head": "0",
|
||||
"add_licensing_template": "2",
|
||||
"extends": "7e822c03-1b20-41d1-9427-f5b8d5836af7",
|
||||
"guid": "0f141480-afe6-41fb-996c-2a4e566a2f0d",
|
||||
"implements": [
|
||||
"64e291c2-11f1-423d-a44d-837cc12cc017"
|
||||
],
|
||||
"load_selection": null,
|
||||
"name": "NewPublishingFields",
|
||||
"power_version": "1.0.0",
|
||||
"system_name": "JCB.Compiler.Builder.NewPublishingFields",
|
||||
"type": "final class",
|
||||
"use_selection": {
|
||||
"use_selection0": {
|
||||
"use": "11572d9b-e3d5-4b29-904c-9618d8f2bfd8",
|
||||
"as": "default"
|
||||
}
|
||||
},
|
||||
"namespace": "VDM\\Joomla\\Componentbuilder.Compiler.Builder.NewPublishingFields",
|
||||
"description": "New Publishing Fields Builder Class\r\n\r\n@since 3.2.0",
|
||||
"licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/joomla\/Component-Builder>\r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n",
|
||||
"head": "",
|
||||
"composer": ""
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
```
|
||||
██████╗ ██████╗ ██╗ ██╗███████╗██████╗
|
||||
██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗
|
||||
██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝
|
||||
██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗
|
||||
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
|
||||
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
|
||||
```
|
||||
# final class Groups (Details)
|
||||
> namespace: **VDM\Joomla\Componentbuilder\Compiler\Field**
|
||||
```uml
|
||||
@startuml
|
||||
class Groups << (F,LightGreen) >> #RoyalBlue {
|
||||
# \JDatabaseDriver $db
|
||||
+ __construct(?\JDatabaseDriver $db = null)
|
||||
+ check(string $type, string $option = 'default') : bool
|
||||
+ types(array $groups = []) : ?array
|
||||
+ typesIds(array $groups = []) : ?array
|
||||
+ spacerIds() : ?array
|
||||
}
|
||||
|
||||
note right of Groups::__construct
|
||||
Constructor
|
||||
|
||||
since: 3.2.0
|
||||
end note
|
||||
|
||||
note right of Groups::check
|
||||
Field Checker
|
||||
|
||||
since: 3.2.0
|
||||
return: bool
|
||||
end note
|
||||
|
||||
note right of Groups::types
|
||||
get the field types id -> name of a group or groups
|
||||
|
||||
since: 3.2.0
|
||||
return: ?array
|
||||
end note
|
||||
|
||||
note right of Groups::typesIds
|
||||
get the field types IDs of a group or groups
|
||||
|
||||
since: 3.2.0
|
||||
return: ?array
|
||||
end note
|
||||
|
||||
note right of Groups::spacerIds
|
||||
get the spacer IDs
|
||||
|
||||
since: 3.2.0
|
||||
return: ?array
|
||||
end note
|
||||
|
||||
@enduml
|
||||
```
|
||||
|
||||
---
|
||||
```
|
||||
██╗ ██████╗██████╗
|
||||
██║██╔════╝██╔══██╗
|
||||
██║██║ ██████╔╝
|
||||
██ ██║██║ ██╔══██╗
|
||||
╚█████╔╝╚██████╗██████╔╝
|
||||
╚════╝ ╚═════╝╚═════╝
|
||||
```
|
||||
> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
||||
|
|
@ -0,0 +1,194 @@
|
|||
<?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
|
||||
*/
|
||||
|
||||
namespace VDM\Joomla\Componentbuilder\Compiler\Field;
|
||||
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use VDM\Joomla\Utilities\ArrayHelper;
|
||||
use VDM\Joomla\Utilities\GetHelper;
|
||||
|
||||
|
||||
/**
|
||||
* Compiler Field Groups
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class Groups
|
||||
{
|
||||
/**
|
||||
* Field Grouping https://docs.joomla.org/Form_field
|
||||
*
|
||||
* @var array
|
||||
* @since 3.2.0
|
||||
**/
|
||||
protected array $groups = [
|
||||
'default' => [
|
||||
'accesslevel', 'cachehandler', 'calendar', 'captcha', 'category', 'checkbox', 'checkboxes', 'chromestyle',
|
||||
'color', 'combo', 'componentlayout', 'contentlanguage', 'contenttype', 'databaseconnection', 'components',
|
||||
'editor', 'editors', 'email', 'file', 'file', 'filelist', 'folderlist', 'groupedlist', 'headertag', 'helpsite', 'hidden', 'imagelist',
|
||||
'integer', 'language', 'list', 'media', 'menu', 'modal_menu', 'menuitem', 'meter', 'modulelayout', 'moduleorder', 'moduleposition',
|
||||
'moduletag', 'note', 'number', 'password', 'plugins', 'predefinedlist', 'radio', 'range', 'repeatable', 'rules',
|
||||
'sessionhandler', 'spacer', 'sql', 'subform', 'tag', 'tel', 'templatestyle', 'text', 'textarea', 'timezone', 'url', 'user', 'usergroup'
|
||||
],
|
||||
'plain' => [
|
||||
'cachehandler', 'calendar', 'checkbox', 'chromestyle', 'color', 'componentlayout', 'contenttype', 'editor', 'editors', 'captcha',
|
||||
'email', 'file', 'headertag', 'helpsite', 'hidden', 'integer', 'language', 'media', 'menu', 'modal_menu', 'menuitem', 'meter', 'modulelayout', 'templatestyle',
|
||||
'moduleorder', 'moduletag', 'number', 'password', 'range', 'rules', 'tag', 'tel', 'text', 'textarea', 'timezone', 'url', 'user', 'usergroup'
|
||||
],
|
||||
'option' => [
|
||||
'accesslevel', 'category', 'checkboxes', 'combo', 'contentlanguage', 'databaseconnection', 'components',
|
||||
'filelist', 'folderlist', 'imagelist', 'list', 'plugins', 'predefinedlist', 'radio', 'sessionhandler', 'sql', 'groupedlist'
|
||||
],
|
||||
'text' => [
|
||||
'calendar', 'color', 'editor', 'email', 'number', 'password', 'range', 'tel', 'text', 'textarea', 'url'
|
||||
],
|
||||
'list' => [
|
||||
'checkbox', 'checkboxes', 'list', 'radio', 'groupedlist', 'combo'
|
||||
],
|
||||
'dynamic' => [
|
||||
'category', 'file', 'filelist', 'folderlist', 'headertag', 'imagelist', 'integer', 'media', 'meter', 'rules', 'tag', 'timezone', 'user'
|
||||
],
|
||||
'spacer' => [
|
||||
'note', 'spacer'
|
||||
],
|
||||
'special' => [
|
||||
'contentlanguage', 'moduleposition', 'plugin', 'repeatable', 'subform'
|
||||
],
|
||||
'search' => [
|
||||
'editor', 'email', 'tel', 'text', 'textarea', 'url', 'subform'
|
||||
]
|
||||
];
|
||||
|
||||
/**
|
||||
* Database object to query local DB
|
||||
*
|
||||
* @var \JDatabaseDriver
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected \JDatabaseDriver $db;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param \JDatabaseDriver|null $db The Database Driver object.
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function __construct(?\JDatabaseDriver $db = null)
|
||||
{
|
||||
$this->db = $db ?: Factory::getDbo();
|
||||
}
|
||||
|
||||
/**
|
||||
* Field Checker
|
||||
*
|
||||
* @param string $type The field type
|
||||
* @param string $option The field grouping
|
||||
*
|
||||
* @return bool if the field was found
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function check(string $type, string $option = 'default'): bool
|
||||
{
|
||||
// now check
|
||||
if (isset($this->groups[$option]) && in_array($type, $this->groups[$option]))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* get the field types id -> name of a group or groups
|
||||
*
|
||||
* @param array $groups The groups
|
||||
*
|
||||
* @return array|null ids of the spacer field types
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function types(array $groups = []): ?array
|
||||
{
|
||||
// make sure we have a group
|
||||
if (($ids = $this->typesIds($groups)) !== null)
|
||||
{
|
||||
// Create a new query object.
|
||||
$query = $this->db->getQuery(true);
|
||||
$query->select($this->db->quoteName(array('id', 'name')));
|
||||
$query->from($this->db->quoteName('#__componentbuilder_fieldtype'));
|
||||
$query->where($this->db->quoteName('published') . ' = 1');
|
||||
$query->where($this->db->quoteName('id') . ' IN (' . implode(',',$ids) . ')');
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$this->db->setQuery($query);
|
||||
$this->db->execute();
|
||||
|
||||
if ($this->db->getNumRows())
|
||||
{
|
||||
return $this->db->loadAssocList('id', 'name');
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* get the field types IDs of a group or groups
|
||||
*
|
||||
* @param array $groups The groups
|
||||
*
|
||||
* @return array|null ids of the spacer field types
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function typesIds(array $groups = []): ?array
|
||||
{
|
||||
// make sure we have a group
|
||||
if (ArrayHelper::check($groups))
|
||||
{
|
||||
$merge_groups = [];
|
||||
foreach ($groups as $group)
|
||||
{
|
||||
if (isset($this->groups[$group]))
|
||||
{
|
||||
$merge_groups[] = $this->groups[$group];
|
||||
}
|
||||
}
|
||||
|
||||
// make sure we have these types of groups
|
||||
if (ArrayHelper::check($merge_groups))
|
||||
{
|
||||
// get the database object to use quote
|
||||
return GetHelper::vars(
|
||||
'fieldtype',
|
||||
(array) array_map(function($name) {
|
||||
return $this->db->quote(ucfirst($name));
|
||||
}, ArrayHelper::merge($merge_groups)),
|
||||
'name',
|
||||
'id'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* get the spacer IDs
|
||||
*
|
||||
* @return array|null ids of the spacer field types
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function spacerIds(): ?array
|
||||
{
|
||||
return $this->typesIds(['spacer']);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,166 @@
|
|||
/**
|
||||
* Field Grouping https://docs.joomla.org/Form_field
|
||||
*
|
||||
* @var array
|
||||
* @since 3.2.0
|
||||
**/
|
||||
protected array $groups = [
|
||||
'default' => [
|
||||
'accesslevel', 'cachehandler', 'calendar', 'captcha', 'category', 'checkbox', 'checkboxes', 'chromestyle',
|
||||
'color', 'combo', 'componentlayout', 'contentlanguage', 'contenttype', 'databaseconnection', 'components',
|
||||
'editor', 'editors', 'email', 'file', 'file', 'filelist', 'folderlist', 'groupedlist', 'headertag', 'helpsite', 'hidden', 'imagelist',
|
||||
'integer', 'language', 'list', 'media', 'menu', 'modal_menu', 'menuitem', 'meter', 'modulelayout', 'moduleorder', 'moduleposition',
|
||||
'moduletag', 'note', 'number', 'password', 'plugins', 'predefinedlist', 'radio', 'range', 'repeatable', 'rules',
|
||||
'sessionhandler', 'spacer', 'sql', 'subform', 'tag', 'tel', 'templatestyle', 'text', 'textarea', 'timezone', 'url', 'user', 'usergroup'
|
||||
],
|
||||
'plain' => [
|
||||
'cachehandler', 'calendar', 'checkbox', 'chromestyle', 'color', 'componentlayout', 'contenttype', 'editor', 'editors', 'captcha',
|
||||
'email', 'file', 'headertag', 'helpsite', 'hidden', 'integer', 'language', 'media', 'menu', 'modal_menu', 'menuitem', 'meter', 'modulelayout', 'templatestyle',
|
||||
'moduleorder', 'moduletag', 'number', 'password', 'range', 'rules', 'tag', 'tel', 'text', 'textarea', 'timezone', 'url', 'user', 'usergroup'
|
||||
],
|
||||
'option' => [
|
||||
'accesslevel', 'category', 'checkboxes', 'combo', 'contentlanguage', 'databaseconnection', 'components',
|
||||
'filelist', 'folderlist', 'imagelist', 'list', 'plugins', 'predefinedlist', 'radio', 'sessionhandler', 'sql', 'groupedlist'
|
||||
],
|
||||
'text' => [
|
||||
'calendar', 'color', 'editor', 'email', 'number', 'password', 'range', 'tel', 'text', 'textarea', 'url'
|
||||
],
|
||||
'list' => [
|
||||
'checkbox', 'checkboxes', 'list', 'radio', 'groupedlist', 'combo'
|
||||
],
|
||||
'dynamic' => [
|
||||
'category', 'file', 'filelist', 'folderlist', 'headertag', 'imagelist', 'integer', 'media', 'meter', 'rules', 'tag', 'timezone', 'user'
|
||||
],
|
||||
'spacer' => [
|
||||
'note', 'spacer'
|
||||
],
|
||||
'special' => [
|
||||
'contentlanguage', 'moduleposition', 'plugin', 'repeatable', 'subform'
|
||||
],
|
||||
'search' => [
|
||||
'editor', 'email', 'tel', 'text', 'textarea', 'url', 'subform'
|
||||
]
|
||||
];
|
||||
|
||||
/**
|
||||
* Database object to query local DB
|
||||
*
|
||||
* @var \JDatabaseDriver
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected \JDatabaseDriver $db;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param \JDatabaseDriver|null $db The Database Driver object.
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function __construct(?\JDatabaseDriver $db = null)
|
||||
{
|
||||
$this->db = $db ?: Factory::getDbo();
|
||||
}
|
||||
|
||||
/**
|
||||
* Field Checker
|
||||
*
|
||||
* @param string $type The field type
|
||||
* @param string $option The field grouping
|
||||
*
|
||||
* @return bool if the field was found
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function check(string $type, string $option = 'default'): bool
|
||||
{
|
||||
// now check
|
||||
if (isset($this->groups[$option]) && in_array($type, $this->groups[$option]))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* get the field types id -> name of a group or groups
|
||||
*
|
||||
* @param array $groups The groups
|
||||
*
|
||||
* @return array|null ids of the spacer field types
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function types(array $groups = []): ?array
|
||||
{
|
||||
// make sure we have a group
|
||||
if (($ids = $this->typesIds($groups)) !== null)
|
||||
{
|
||||
// Create a new query object.
|
||||
$query = $this->db->getQuery(true);
|
||||
$query->select($this->db->quoteName(array('id', 'name')));
|
||||
$query->from($this->db->quoteName('#__componentbuilder_fieldtype'));
|
||||
$query->where($this->db->quoteName('published') . ' = 1');
|
||||
$query->where($this->db->quoteName('id') . ' IN (' . implode(',',$ids) . ')');
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$this->db->setQuery($query);
|
||||
$this->db->execute();
|
||||
|
||||
if ($this->db->getNumRows())
|
||||
{
|
||||
return $this->db->loadAssocList('id', 'name');
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* get the field types IDs of a group or groups
|
||||
*
|
||||
* @param array $groups The groups
|
||||
*
|
||||
* @return array|null ids of the spacer field types
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function typesIds(array $groups = []): ?array
|
||||
{
|
||||
// make sure we have a group
|
||||
if (ArrayHelper::check($groups))
|
||||
{
|
||||
$merge_groups = [];
|
||||
foreach ($groups as $group)
|
||||
{
|
||||
if (isset($this->groups[$group]))
|
||||
{
|
||||
$merge_groups[] = $this->groups[$group];
|
||||
}
|
||||
}
|
||||
|
||||
// make sure we have these types of groups
|
||||
if (ArrayHelper::check($merge_groups))
|
||||
{
|
||||
// get the database object to use quote
|
||||
return GetHelper::vars(
|
||||
'fieldtype',
|
||||
(array) array_map(function($name) {
|
||||
return $this->db->quote(ucfirst($name));
|
||||
}, ArrayHelper::merge($merge_groups)),
|
||||
'name',
|
||||
'id'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* get the spacer IDs
|
||||
*
|
||||
* @return array|null ids of the spacer field types
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function spacerIds(): ?array
|
||||
{
|
||||
return $this->typesIds(['spacer']);
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"add_head": "1",
|
||||
"add_licensing_template": "2",
|
||||
"extends": "0",
|
||||
"guid": "12df35ad-2d44-4c4c-a7d5-a3350932a520",
|
||||
"implements": null,
|
||||
"load_selection": null,
|
||||
"name": "Groups",
|
||||
"power_version": "1.0.0",
|
||||
"system_name": "JCB.Compiler.Field.Groups",
|
||||
"type": "final class",
|
||||
"use_selection": {
|
||||
"use_selection0": {
|
||||
"use": "0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection1": {
|
||||
"use": "db87c339-5bb6-4291-a7ef-2c48ea1b06bc",
|
||||
"as": "default"
|
||||
}
|
||||
},
|
||||
"namespace": "VDM\\Joomla\\Componentbuilder.Compiler.Field.Groups",
|
||||
"description": "Compiler Field Groups\r\n\r\n@since 3.2.0",
|
||||
"licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/joomla\/Component-Builder>\r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n",
|
||||
"head": "use Joomla\\CMS\\Factory;",
|
||||
"composer": ""
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
```
|
||||
██████╗ ██████╗ ██╗ ██╗███████╗██████╗
|
||||
██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗
|
||||
██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝
|
||||
██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗
|
||||
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
|
||||
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
|
||||
```
|
||||
# final class SiteFieldData (Details)
|
||||
> namespace: **VDM\Joomla\Componentbuilder\Compiler\Creator**
|
||||
```uml
|
||||
@startuml
|
||||
class SiteFieldData << (F,LightGreen) >> #RoyalBlue {
|
||||
# Config $config
|
||||
# SiteFields $sitefields
|
||||
# SiteField $sitefield
|
||||
# array $decode
|
||||
# array $textareas
|
||||
+ __construct(Config $config, SiteFields $sitefields, ...)
|
||||
+ set(string $view, string $field, ...) : void
|
||||
}
|
||||
|
||||
note right of SiteFieldData::__construct
|
||||
Constructor.
|
||||
|
||||
since: 3.2.0
|
||||
|
||||
arguments:
|
||||
Config $config
|
||||
SiteFields $sitefields
|
||||
SiteField $sitefield
|
||||
end note
|
||||
|
||||
note right of SiteFieldData::set
|
||||
set the site field data needed
|
||||
|
||||
return: void
|
||||
|
||||
arguments:
|
||||
string $view
|
||||
string $field
|
||||
string $set
|
||||
string $type
|
||||
end note
|
||||
|
||||
@enduml
|
||||
```
|
||||
|
||||
---
|
||||
```
|
||||
██╗ ██████╗██████╗
|
||||
██║██╔════╝██╔══██╗
|
||||
██║██║ ██████╔╝
|
||||
██ ██║██║ ██╔══██╗
|
||||
╚█████╔╝╚██████╗██████╔╝
|
||||
╚════╝ ╚═════╝╚═════╝
|
||||
```
|
||||
> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
||||
|
|
@ -0,0 +1,154 @@
|
|||
<?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
|
||||
*/
|
||||
|
||||
namespace VDM\Joomla\Componentbuilder\Compiler\Creator;
|
||||
|
||||
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Config;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Builder\SiteFields;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Builder\SiteFieldData as SiteField;
|
||||
|
||||
|
||||
/**
|
||||
* Site Field Data Creator Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class SiteFieldData
|
||||
{
|
||||
/**
|
||||
* The Config Class.
|
||||
*
|
||||
* @var Config
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Config $config;
|
||||
|
||||
/**
|
||||
* The SiteFields Class.
|
||||
*
|
||||
* @var SiteFields
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected SiteFields $sitefields;
|
||||
|
||||
/**
|
||||
* The SiteFieldData Class.
|
||||
*
|
||||
* @var SiteField
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected SiteField $sitefield;
|
||||
|
||||
/**
|
||||
* The decoding options
|
||||
*
|
||||
* @var array
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected array $decode = [
|
||||
'json',
|
||||
'base64',
|
||||
'basic_encryption',
|
||||
'whmcs_encryption',
|
||||
'medium_encryption',
|
||||
'expert_mode'
|
||||
];
|
||||
|
||||
/**
|
||||
* The text areas
|
||||
*
|
||||
* @var array
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected array $textareas = [
|
||||
'textarea',
|
||||
'editor'
|
||||
];
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param Config $config The Config Class.
|
||||
* @param SiteFields $sitefields The SiteFields Class.
|
||||
* @param SiteField $sitefield The SiteFieldData Class.
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function __construct(Config $config, SiteFields $sitefields,
|
||||
SiteField $sitefield)
|
||||
{
|
||||
$this->config = $config;
|
||||
$this->sitefields = $sitefields;
|
||||
$this->sitefield = $sitefield;
|
||||
}
|
||||
|
||||
/**
|
||||
* set the site field data needed
|
||||
*
|
||||
* @param string $view The single edit view code name
|
||||
* @param string $field The field name
|
||||
* @param string $set The decoding set this field belongs to
|
||||
* @param string $type The field type
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
*/
|
||||
public function set(string $view, string $field, string $set, string $type): void
|
||||
{
|
||||
if (($site_fields = $this->sitefields->get($view . '.' . $field)) !== null)
|
||||
{
|
||||
foreach ($site_fields as $codeString => $site_field)
|
||||
{
|
||||
// get the code array
|
||||
$codeArray = explode('___', (string) $codeString);
|
||||
// set the code
|
||||
$code = trim($codeArray[0]);
|
||||
// set the path
|
||||
$path = $site_field['site'] . '.' . $code . '.' . $site_field['as'] . '.' . $site_field['key'];
|
||||
|
||||
// set the decoding methods
|
||||
if (in_array($set, $this->decode))
|
||||
{
|
||||
if ($this->sitefield->exists('decode.' . $path . '.decode'))
|
||||
{
|
||||
if (!$this->sitefield->inArray($set, 'decode.' . $path . '.decode'))
|
||||
{
|
||||
$this->sitefield->add('decode.' . $path . '.decode', $set, true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->sitefield->set('decode.' . $path, [
|
||||
'decode' => [$set],
|
||||
'type' => $type,
|
||||
'admin_view' => $view
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
// set the uikit checker
|
||||
if ((2 == $this->config->uikit || 1 == $this->config->uikit)
|
||||
&& in_array($type, $this->textareas))
|
||||
{
|
||||
$this->sitefield->add('uikit.' . $path, (array) $site_field, true);
|
||||
}
|
||||
|
||||
// set the text area checker
|
||||
if (in_array($type, $this->textareas))
|
||||
{
|
||||
$this->sitefield->add('textareas.' . $path, (array) $site_field, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,126 @@
|
|||
/**
|
||||
* The Config Class.
|
||||
*
|
||||
* @var Config
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Config $config;
|
||||
|
||||
/**
|
||||
* The SiteFields Class.
|
||||
*
|
||||
* @var SiteFields
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected SiteFields $sitefields;
|
||||
|
||||
/**
|
||||
* The SiteFieldData Class.
|
||||
*
|
||||
* @var SiteField
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected SiteField $sitefield;
|
||||
|
||||
/**
|
||||
* The decoding options
|
||||
*
|
||||
* @var array
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected array $decode = [
|
||||
'json',
|
||||
'base64',
|
||||
'basic_encryption',
|
||||
'whmcs_encryption',
|
||||
'medium_encryption',
|
||||
'expert_mode'
|
||||
];
|
||||
|
||||
/**
|
||||
* The text areas
|
||||
*
|
||||
* @var array
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected array $textareas = [
|
||||
'textarea',
|
||||
'editor'
|
||||
];
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param Config $config The Config Class.
|
||||
* @param SiteFields $sitefields The SiteFields Class.
|
||||
* @param SiteField $sitefield The SiteFieldData Class.
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function __construct(Config $config, SiteFields $sitefields,
|
||||
SiteField $sitefield)
|
||||
{
|
||||
$this->config = $config;
|
||||
$this->sitefields = $sitefields;
|
||||
$this->sitefield = $sitefield;
|
||||
}
|
||||
|
||||
/**
|
||||
* set the site field data needed
|
||||
*
|
||||
* @param string $view The single edit view code name
|
||||
* @param string $field The field name
|
||||
* @param string $set The decoding set this field belongs to
|
||||
* @param string $type The field type
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
*/
|
||||
public function set(string $view, string $field, string $set, string $type): void
|
||||
{
|
||||
if (($site_fields = $this->sitefields->get($view . '.' . $field)) !== null)
|
||||
{
|
||||
foreach ($site_fields as $codeString => $site_field)
|
||||
{
|
||||
// get the code array
|
||||
$codeArray = explode('___', (string) $codeString);
|
||||
// set the code
|
||||
$code = trim($codeArray[0]);
|
||||
// set the path
|
||||
$path = $site_field['site'] . '.' . $code . '.' . $site_field['as'] . '.' . $site_field['key'];
|
||||
|
||||
// set the decoding methods
|
||||
if (in_array($set, $this->decode))
|
||||
{
|
||||
if ($this->sitefield->exists('decode.' . $path . '.decode'))
|
||||
{
|
||||
if (!$this->sitefield->inArray($set, 'decode.' . $path . '.decode'))
|
||||
{
|
||||
$this->sitefield->add('decode.' . $path . '.decode', $set, true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->sitefield->set('decode.' . $path, [
|
||||
'decode' => [$set],
|
||||
'type' => $type,
|
||||
'admin_view' => $view
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
// set the uikit checker
|
||||
if ((2 == $this->config->uikit || 1 == $this->config->uikit)
|
||||
&& in_array($type, $this->textareas))
|
||||
{
|
||||
$this->sitefield->add('uikit.' . $path, (array) $site_field, true);
|
||||
}
|
||||
|
||||
// set the text area checker
|
||||
if (in_array($type, $this->textareas))
|
||||
{
|
||||
$this->sitefield->add('textareas.' . $path, (array) $site_field, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"add_head": "0",
|
||||
"add_licensing_template": "2",
|
||||
"extends": "0",
|
||||
"guid": "15b4addf-bf6b-4691-9c92-858c7de9c2c1",
|
||||
"implements": null,
|
||||
"load_selection": null,
|
||||
"name": "SiteFieldData",
|
||||
"power_version": "1.0.0",
|
||||
"system_name": "JCB.Compiler.Creator.SiteFieldData",
|
||||
"type": "final class",
|
||||
"use_selection": {
|
||||
"use_selection0": {
|
||||
"use": "fa4bf18e-301e-42e3-91fb-6e0096c07adc",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection1": {
|
||||
"use": "52de0ac8-bb9d-4a45-bd2a-a44c48c17ffe",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection2": {
|
||||
"use": "33f5131e-4a5b-414b-95dd-d22227c2666d",
|
||||
"as": "SiteField"
|
||||
}
|
||||
},
|
||||
"namespace": "VDM\\Joomla\\Componentbuilder.Compiler.Creator.SiteFieldData",
|
||||
"description": "Site Field Data Creator Class\r\n\r\n@since 3.2.0",
|
||||
"licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/joomla\/Component-Builder>\r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n",
|
||||
"head": "",
|
||||
"composer": ""
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
```
|
||||
██████╗ ██████╗ ██╗ ██╗███████╗██████╗
|
||||
██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗
|
||||
██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝
|
||||
██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗
|
||||
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
|
||||
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
|
||||
```
|
||||
# final class ScriptMediaSwitch (Details)
|
||||
> namespace: **VDM\Joomla\Componentbuilder\Compiler\Builder**
|
||||
> extends: **StorageRegistry**
|
||||
```uml
|
||||
@startuml
|
||||
class ScriptMediaSwitch << (F,LightGreen) >> #RoyalBlue {
|
||||
}
|
||||
|
||||
@enduml
|
||||
```
|
||||
|
||||
---
|
||||
```
|
||||
██╗ ██████╗██████╗
|
||||
██║██╔════╝██╔══██╗
|
||||
██║██║ ██████╔╝
|
||||
██ ██║██║ ██╔══██╗
|
||||
╚█████╔╝╚██████╗██████╔╝
|
||||
╚════╝ ╚═════╝╚═════╝
|
||||
```
|
||||
> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
<?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
|
||||
*/
|
||||
|
||||
namespace VDM\Joomla\Componentbuilder\Compiler\Builder;
|
||||
|
||||
|
||||
use VDM\Joomla\Abstraction\StorageRegistry\Traits\InArray;
|
||||
use VDM\Joomla\Interfaces\Storageregistryinterface;
|
||||
use VDM\Joomla\Abstraction\StorageRegistry;
|
||||
|
||||
|
||||
/**
|
||||
* Script Media Switch Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class ScriptMediaSwitch extends StorageRegistry implements Storageregistryinterface
|
||||
{
|
||||
/**
|
||||
* In Array
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
use InArray;
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
/**
|
||||
* In Array
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
use InArray;
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"add_head": "0",
|
||||
"add_licensing_template": "2",
|
||||
"extends": "7e822c03-1b20-41d1-9427-f5b8d5836af7",
|
||||
"guid": "17bf80af-3609-4f36-a520-be1a339c278b",
|
||||
"implements": [
|
||||
"64e291c2-11f1-423d-a44d-837cc12cc017"
|
||||
],
|
||||
"load_selection": null,
|
||||
"name": "ScriptMediaSwitch",
|
||||
"power_version": "1.0.0",
|
||||
"system_name": "JCB.Compiler.Builder.ScriptMediaSwitch",
|
||||
"type": "final class",
|
||||
"use_selection": {
|
||||
"use_selection0": {
|
||||
"use": "215b35ac-1b26-4838-bbcf-d1fdbbd9353f",
|
||||
"as": "default"
|
||||
}
|
||||
},
|
||||
"namespace": "VDM\\Joomla\\Componentbuilder.Compiler.Builder.ScriptMediaSwitch",
|
||||
"description": "Script Media Switch Builder Class\r\n\r\n@since 3.2.0",
|
||||
"licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/joomla\/Component-Builder>\r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n",
|
||||
"head": "",
|
||||
"composer": ""
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
```
|
||||
██████╗ ██████╗ ██╗ ██╗███████╗██████╗
|
||||
██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗
|
||||
██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝
|
||||
██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗
|
||||
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
|
||||
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
|
||||
```
|
||||
# final class SiteMainGet (Details)
|
||||
> namespace: **VDM\Joomla\Componentbuilder\Compiler\Builder**
|
||||
> extends: **StorageRegistry**
|
||||
```uml
|
||||
@startuml
|
||||
class SiteMainGet << (F,LightGreen) >> #RoyalBlue {
|
||||
}
|
||||
|
||||
@enduml
|
||||
```
|
||||
|
||||
---
|
||||
```
|
||||
██╗ ██████╗██████╗
|
||||
██║██╔════╝██╔══██╗
|
||||
██║██║ ██████╔╝
|
||||
██ ██║██║ ██╔══██╗
|
||||
╚█████╔╝╚██████╗██████╔╝
|
||||
╚════╝ ╚═════╝╚═════╝
|
||||
```
|
||||
> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
<?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
|
||||
*/
|
||||
|
||||
namespace VDM\Joomla\Componentbuilder\Compiler\Builder;
|
||||
|
||||
|
||||
use VDM\Joomla\Interfaces\Storageregistryinterface;
|
||||
use VDM\Joomla\Abstraction\StorageRegistry;
|
||||
|
||||
|
||||
/**
|
||||
* Site Main Get Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class SiteMainGet extends StorageRegistry implements Storageregistryinterface
|
||||
{
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
###CODEPOWER###
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"add_head": "0",
|
||||
"add_licensing_template": "2",
|
||||
"extends": "7e822c03-1b20-41d1-9427-f5b8d5836af7",
|
||||
"guid": "17fa7789-a7d1-465e-b733-8c8d53f5ca1b",
|
||||
"implements": [
|
||||
"64e291c2-11f1-423d-a44d-837cc12cc017"
|
||||
],
|
||||
"load_selection": null,
|
||||
"name": "SiteMainGet",
|
||||
"power_version": "1.0.0",
|
||||
"system_name": "JCB.Compiler.Builder.SiteMainGet",
|
||||
"type": "final class",
|
||||
"use_selection": null,
|
||||
"namespace": "VDM\\Joomla\\Componentbuilder.Compiler.Builder.SiteMainGet",
|
||||
"description": "Site Main Get Builder Class\r\n\r\n@since 3.2.0",
|
||||
"licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/joomla\/Component-Builder>\r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n",
|
||||
"head": "",
|
||||
"composer": ""
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
```
|
||||
██████╗ ██████╗ ██╗ ██╗███████╗██████╗
|
||||
██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗
|
||||
██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝
|
||||
██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗
|
||||
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
|
||||
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
|
||||
```
|
||||
# final class DynamicFields (Details)
|
||||
> namespace: **VDM\Joomla\Componentbuilder\Compiler\Builder**
|
||||
> extends: **StorageRegistry**
|
||||
```uml
|
||||
@startuml
|
||||
class DynamicFields << (F,LightGreen) >> #RoyalBlue {
|
||||
}
|
||||
|
||||
@enduml
|
||||
```
|
||||
|
||||
---
|
||||
```
|
||||
██╗ ██████╗██████╗
|
||||
██║██╔════╝██╔══██╗
|
||||
██║██║ ██████╔╝
|
||||
██ ██║██║ ██╔══██╗
|
||||
╚█████╔╝╚██████╗██████╔╝
|
||||
╚════╝ ╚═════╝╚═════╝
|
||||
```
|
||||
> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
<?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
|
||||
*/
|
||||
|
||||
namespace VDM\Joomla\Componentbuilder\Compiler\Builder;
|
||||
|
||||
|
||||
use VDM\Joomla\Abstraction\StorageRegistry\Traits\ToString;
|
||||
use VDM\Joomla\Interfaces\Storageregistryinterface;
|
||||
use VDM\Joomla\Abstraction\StorageRegistry;
|
||||
|
||||
|
||||
/**
|
||||
* Dynamic Fields Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class DynamicFields extends StorageRegistry implements Storageregistryinterface
|
||||
{
|
||||
/**
|
||||
* To String Values
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
use ToString;
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
/**
|
||||
* To String Values
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
use ToString;
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"add_head": "0",
|
||||
"add_licensing_template": "2",
|
||||
"extends": "7e822c03-1b20-41d1-9427-f5b8d5836af7",
|
||||
"guid": "1ae9a8e8-59f7-4844-a08d-9a4dce4be076",
|
||||
"implements": [
|
||||
"64e291c2-11f1-423d-a44d-837cc12cc017"
|
||||
],
|
||||
"load_selection": null,
|
||||
"name": "DynamicFields",
|
||||
"power_version": "1.0.0",
|
||||
"system_name": "JCB.Compiler.Builder.DynamicFields",
|
||||
"type": "final class",
|
||||
"use_selection": {
|
||||
"use_selection0": {
|
||||
"use": "7d494d91-ab60-43cd-aecf-d50e07f7f30e",
|
||||
"as": "default"
|
||||
}
|
||||
},
|
||||
"namespace": "VDM\\Joomla\\Componentbuilder.Compiler.Builder.DynamicFields",
|
||||
"description": "Dynamic Fields Builder Class\r\n\r\n@since 3.2.0",
|
||||
"licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/joomla\/Component-Builder>\r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n",
|
||||
"head": "",
|
||||
"composer": ""
|
||||
}
|
|
@ -66,15 +66,25 @@ class Updateserver
|
|||
if (isset($update['change_log']) && StringHelper::check($update['change_log'])
|
||||
&& isset($update['version']) && StringHelper::check($update['version']))
|
||||
{
|
||||
$bucket[] = '# v' . $update['version'] . PHP_EOL . PHP_EOL . $update['change_log'];
|
||||
$bucket[] = [
|
||||
'version' => $update['version'],
|
||||
'change_log' => '# v' . $update['version'] . PHP_EOL . PHP_EOL . $update['change_log']
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
if (ArrayHelper::check($bucket))
|
||||
// Sort bucket by version, newest at the top
|
||||
usort($bucket, function ($a, $b) {
|
||||
return version_compare($b['version'], $a['version']);
|
||||
});
|
||||
|
||||
// Extract change logs from sorted bucket
|
||||
$sorted_change_logs = array_column($bucket, 'change_log');
|
||||
|
||||
if (ArrayHelper::check($sorted_change_logs))
|
||||
{
|
||||
$item->changelog = implode(PHP_EOL . PHP_EOL, $bucket);
|
||||
$item->changelog = implode(PHP_EOL . PHP_EOL, $sorted_change_logs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -40,12 +40,23 @@
|
|||
if (isset($update['change_log']) && StringHelper::check($update['change_log'])
|
||||
&& isset($update['version']) && StringHelper::check($update['version']))
|
||||
{
|
||||
$bucket[] = '# v' . $update['version'] . PHP_EOL . PHP_EOL . $update['change_log'];
|
||||
$bucket[] = [
|
||||
'version' => $update['version'],
|
||||
'change_log' => '# v' . $update['version'] . PHP_EOL . PHP_EOL . $update['change_log']
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
if (ArrayHelper::check($bucket))
|
||||
// Sort bucket by version, newest at the top
|
||||
usort($bucket, function ($a, $b) {
|
||||
return version_compare($b['version'], $a['version']);
|
||||
});
|
||||
|
||||
// Extract change logs from sorted bucket
|
||||
$sorted_change_logs = array_column($bucket, 'change_log');
|
||||
|
||||
if (ArrayHelper::check($sorted_change_logs))
|
||||
{
|
||||
$item->changelog = implode(PHP_EOL . PHP_EOL, $bucket);
|
||||
$item->changelog = implode(PHP_EOL . PHP_EOL, $sorted_change_logs);
|
||||
}
|
||||
}
|
|
@ -6,7 +6,16 @@
|
|||
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
|
||||
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
|
||||
```
|
||||
> Error adding class diagram
|
||||
# class Files (Details)
|
||||
> namespace: **VDM\Joomla\Componentbuilder\Compiler\Utilities**
|
||||
> extends: **BaseRegistry**
|
||||
```uml
|
||||
@startuml
|
||||
class Files #Gold {
|
||||
}
|
||||
|
||||
@enduml
|
||||
```
|
||||
|
||||
---
|
||||
```
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
```
|
||||
██████╗ ██████╗ ██╗ ██╗███████╗██████╗
|
||||
██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗
|
||||
██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝
|
||||
██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗
|
||||
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
|
||||
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
|
||||
```
|
||||
# final class ItemsMethodEximportString (Details)
|
||||
> namespace: **VDM\Joomla\Componentbuilder\Compiler\Builder**
|
||||
> extends: **StorageRegistry**
|
||||
```uml
|
||||
@startuml
|
||||
class ItemsMethodEximportString << (F,LightGreen) >> #RoyalBlue {
|
||||
}
|
||||
|
||||
@enduml
|
||||
```
|
||||
|
||||
---
|
||||
```
|
||||
██╗ ██████╗██████╗
|
||||
██║██╔════╝██╔══██╗
|
||||
██║██║ ██████╔╝
|
||||
██ ██║██║ ██╔══██╗
|
||||
╚█████╔╝╚██████╗██████╔╝
|
||||
╚════╝ ╚═════╝╚═════╝
|
||||
```
|
||||
> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
<?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
|
||||
*/
|
||||
|
||||
namespace VDM\Joomla\Componentbuilder\Compiler\Builder;
|
||||
|
||||
|
||||
use VDM\Joomla\Interfaces\Storageregistryinterface;
|
||||
use VDM\Joomla\Abstraction\StorageRegistry;
|
||||
|
||||
|
||||
/**
|
||||
* Items Method Eximport String Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class ItemsMethodEximportString extends StorageRegistry implements Storageregistryinterface
|
||||
{
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
###CODEPOWER###
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"add_head": "0",
|
||||
"add_licensing_template": "2",
|
||||
"extends": "7e822c03-1b20-41d1-9427-f5b8d5836af7",
|
||||
"guid": "1f086665-c007-4085-b363-3a118659ff1b",
|
||||
"implements": [
|
||||
"64e291c2-11f1-423d-a44d-837cc12cc017"
|
||||
],
|
||||
"load_selection": null,
|
||||
"name": "ItemsMethodEximportString",
|
||||
"power_version": "1.0.0",
|
||||
"system_name": "JCB.Compiler.Builder.ItemsMethodEximportString",
|
||||
"type": "final class",
|
||||
"use_selection": null,
|
||||
"namespace": "VDM\\Joomla\\Componentbuilder.Compiler.Builder.ItemsMethodEximportString",
|
||||
"description": "Items Method Eximport String Builder Class\r\n\r\n@since 3.2.0",
|
||||
"licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/joomla\/Component-Builder>\r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n",
|
||||
"head": "",
|
||||
"composer": ""
|
||||
}
|
|
@ -0,0 +1,89 @@
|
|||
```
|
||||
██████╗ ██████╗ ██╗ ██╗███████╗██████╗
|
||||
██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗
|
||||
██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝
|
||||
██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗
|
||||
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
|
||||
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
|
||||
```
|
||||
# final class Load (Details)
|
||||
> namespace: **VDM\Joomla\Componentbuilder\Power\Database**
|
||||
```uml
|
||||
@startuml
|
||||
class Load << (F,LightGreen) >> #RoyalBlue {
|
||||
# Model $model
|
||||
# Database $load
|
||||
+ __construct(Model $model, Database $load)
|
||||
+ value(array $keys, string $field) : mixed
|
||||
+ item(array $keys) : ?object
|
||||
+ items(array $keys) : ?array
|
||||
- prefix(array $keys) : array
|
||||
}
|
||||
|
||||
note right of Load::__construct
|
||||
Constructor
|
||||
|
||||
since: 2.0.1
|
||||
end note
|
||||
|
||||
note right of Load::value
|
||||
Get a value from a given table
|
||||
Example: $this->value(
|
||||
[
|
||||
'guid' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
|
||||
], 'value_key'
|
||||
);
|
||||
|
||||
since: 2.0.1
|
||||
return: mixed
|
||||
end note
|
||||
|
||||
note right of Load::item
|
||||
Get values from a given table
|
||||
Example: $this->item(
|
||||
[
|
||||
'guid' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
|
||||
]
|
||||
);
|
||||
|
||||
since: 2.0.1
|
||||
return: ?object
|
||||
end note
|
||||
|
||||
note right of Load::items
|
||||
Get values from a given table
|
||||
Example: $this->items(
|
||||
[
|
||||
'guid' => [
|
||||
'operator' => 'IN',
|
||||
'value' => [''xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'', ''xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'']
|
||||
]
|
||||
]
|
||||
);
|
||||
Example: $this->items($ids, 'table_name');
|
||||
|
||||
since: 2.0.1
|
||||
return: ?array
|
||||
end note
|
||||
|
||||
note right of Load::prefix
|
||||
Add prefix to the keys
|
||||
|
||||
since: 2.0.1
|
||||
return: array
|
||||
end note
|
||||
|
||||
@enduml
|
||||
```
|
||||
|
||||
---
|
||||
```
|
||||
██╗ ██████╗██████╗
|
||||
██║██╔════╝██╔══██╗
|
||||
██║██║ ██████╔╝
|
||||
██ ██║██║ ██╔══██╗
|
||||
╚█████╔╝╚██████╗██████╔╝
|
||||
╚════╝ ╚═════╝╚═════╝
|
||||
```
|
||||
> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
||||
|
|
@ -0,0 +1,158 @@
|
|||
<?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
|
||||
*/
|
||||
|
||||
namespace VDM\Joomla\Componentbuilder\Power\Database;
|
||||
|
||||
|
||||
use VDM\Joomla\Componentbuilder\Power\Model\Load as Model;
|
||||
use VDM\Joomla\Database\Load as Database;
|
||||
|
||||
|
||||
/**
|
||||
* Power Database Load
|
||||
*
|
||||
* @since 2.0.1
|
||||
*/
|
||||
final class Load
|
||||
{
|
||||
/**
|
||||
* Model Load
|
||||
*
|
||||
* @var Model
|
||||
* @since 2.0.1
|
||||
*/
|
||||
protected Model $model;
|
||||
|
||||
/**
|
||||
* Database Load
|
||||
*
|
||||
* @var Database
|
||||
* @since 2.0.1
|
||||
*/
|
||||
protected Database $load;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param Table $table The core table object.
|
||||
* @param Model $model The model object.
|
||||
* @param Database $load The database object.
|
||||
*
|
||||
* @since 2.0.1
|
||||
*/
|
||||
public function __construct(Model $model, Database $load)
|
||||
{
|
||||
$this->model = $model;
|
||||
$this->load = $load;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a value from a given table
|
||||
* Example: $this->value(
|
||||
* [
|
||||
* 'guid' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
|
||||
* ], 'value_key'
|
||||
* );
|
||||
*
|
||||
* @param array $keys The item keys
|
||||
* @param string $field The field key
|
||||
* @param string $table The table
|
||||
*
|
||||
* @return mixed
|
||||
* @since 2.0.1
|
||||
*/
|
||||
public function value(array $keys, string $field)
|
||||
{
|
||||
return $this->model->value(
|
||||
$this->load->value(
|
||||
["a.${field}" => $field],
|
||||
['a' => 'power'],
|
||||
$this->prefix($keys)
|
||||
),
|
||||
$field,
|
||||
'power'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get values from a given table
|
||||
* Example: $this->item(
|
||||
* [
|
||||
* 'guid' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
|
||||
* ]
|
||||
* );
|
||||
*
|
||||
* @param array $keys The item keys
|
||||
* @param string $table The table
|
||||
*
|
||||
* @return object|null
|
||||
* @since 2.0.1
|
||||
*/
|
||||
public function item(array $keys): ?object
|
||||
{
|
||||
return $this->model->item(
|
||||
$this->load->item(
|
||||
['all' => 'a.*'],
|
||||
['a' => 'power'],
|
||||
$this->prefix($keys)
|
||||
),
|
||||
'power'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get values from a given table
|
||||
* Example: $this->items(
|
||||
* [
|
||||
* 'guid' => [
|
||||
* 'operator' => 'IN',
|
||||
* 'value' => [''xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'', ''xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'']
|
||||
* ]
|
||||
* ]
|
||||
* );
|
||||
* Example: $this->items($ids, 'table_name');
|
||||
*
|
||||
* @param array $keys The item keys
|
||||
* @param string $table The table
|
||||
*
|
||||
* @return array|null
|
||||
* @since 2.0.1
|
||||
*/
|
||||
public function items(array $keys): ?array
|
||||
{
|
||||
return $this->model->items(
|
||||
$this->load->items(
|
||||
['all' => 'a.*'], ['a' => 'power'], $this->prefix($keys)
|
||||
),
|
||||
'power'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add prefix to the keys
|
||||
*
|
||||
* @param array $keys The query keys
|
||||
*
|
||||
* @return array
|
||||
* @since 2.0.1
|
||||
*/
|
||||
private function prefix(array &$keys): array
|
||||
{
|
||||
// update the key values
|
||||
$bucket = [];
|
||||
foreach ($keys as $k => $v)
|
||||
{
|
||||
$bucket['a.' . $k] = $v;
|
||||
}
|
||||
return $bucket;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,131 @@
|
|||
/**
|
||||
* Model Load
|
||||
*
|
||||
* @var Model
|
||||
* @since 2.0.1
|
||||
*/
|
||||
protected Model $model;
|
||||
|
||||
/**
|
||||
* Database Load
|
||||
*
|
||||
* @var Database
|
||||
* @since 2.0.1
|
||||
*/
|
||||
protected Database $load;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param Table $table The core table object.
|
||||
* @param Model $model The model object.
|
||||
* @param Database $load The database object.
|
||||
*
|
||||
* @since 2.0.1
|
||||
*/
|
||||
public function __construct(Model $model, Database $load)
|
||||
{
|
||||
$this->model = $model;
|
||||
$this->load = $load;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a value from a given table
|
||||
* Example: $this->value(
|
||||
* [
|
||||
* 'guid' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
|
||||
* ], 'value_key'
|
||||
* );
|
||||
*
|
||||
* @param array $keys The item keys
|
||||
* @param string $field The field key
|
||||
* @param string $table The table
|
||||
*
|
||||
* @return mixed
|
||||
* @since 2.0.1
|
||||
*/
|
||||
public function value(array $keys, string $field)
|
||||
{
|
||||
return $this->model->value(
|
||||
$this->load->value(
|
||||
["a.${field}" => $field],
|
||||
['a' => 'power'],
|
||||
$this->prefix($keys)
|
||||
),
|
||||
$field,
|
||||
'power'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get values from a given table
|
||||
* Example: $this->item(
|
||||
* [
|
||||
* 'guid' => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
|
||||
* ]
|
||||
* );
|
||||
*
|
||||
* @param array $keys The item keys
|
||||
* @param string $table The table
|
||||
*
|
||||
* @return object|null
|
||||
* @since 2.0.1
|
||||
*/
|
||||
public function item(array $keys): ?object
|
||||
{
|
||||
return $this->model->item(
|
||||
$this->load->item(
|
||||
['all' => 'a.*'],
|
||||
['a' => 'power'],
|
||||
$this->prefix($keys)
|
||||
),
|
||||
'power'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get values from a given table
|
||||
* Example: $this->items(
|
||||
* [
|
||||
* 'guid' => [
|
||||
* 'operator' => 'IN',
|
||||
* 'value' => [''xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'', ''xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'']
|
||||
* ]
|
||||
* ]
|
||||
* );
|
||||
* Example: $this->items($ids, 'table_name');
|
||||
*
|
||||
* @param array $keys The item keys
|
||||
* @param string $table The table
|
||||
*
|
||||
* @return array|null
|
||||
* @since 2.0.1
|
||||
*/
|
||||
public function items(array $keys): ?array
|
||||
{
|
||||
return $this->model->items(
|
||||
$this->load->items(
|
||||
['all' => 'a.*'], ['a' => 'power'], $this->prefix($keys)
|
||||
),
|
||||
'power'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add prefix to the keys
|
||||
*
|
||||
* @param array $keys The query keys
|
||||
*
|
||||
* @return array
|
||||
* @since 2.0.1
|
||||
*/
|
||||
private function prefix(array &$keys): array
|
||||
{
|
||||
// update the key values
|
||||
$bucket = [];
|
||||
foreach ($keys as $k => $v)
|
||||
{
|
||||
$bucket['a.' . $k] = $v;
|
||||
}
|
||||
return $bucket;
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"add_head": "0",
|
||||
"add_licensing_template": "2",
|
||||
"extends": "0",
|
||||
"guid": "1f86db0f-e271-45df-8795-3e503ec76698",
|
||||
"implements": null,
|
||||
"load_selection": null,
|
||||
"name": "Load",
|
||||
"power_version": "1.0.0",
|
||||
"system_name": "JCB.Power.Database.Load",
|
||||
"type": "final class",
|
||||
"use_selection": {
|
||||
"use_selection0": {
|
||||
"use": "bb29a833-73f7-4283-9327-bc7e41f0723b",
|
||||
"as": "Model"
|
||||
},
|
||||
"use_selection1": {
|
||||
"use": "06f8eada-d59b-441c-b287-0aea1793da5a",
|
||||
"as": "Database"
|
||||
}
|
||||
},
|
||||
"namespace": "VDM\\Joomla\\Componentbuilder.Power.Database.Load",
|
||||
"description": "Power Database Load\r\n\r\n@since 2.0.1",
|
||||
"licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/joomla\/Component-Builder>\r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n",
|
||||
"head": "",
|
||||
"composer": ""
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
```
|
||||
██████╗ ██████╗ ██╗ ██╗███████╗██████╗
|
||||
██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗
|
||||
██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝
|
||||
██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗
|
||||
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
|
||||
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
|
||||
```
|
||||
# final class CustomList (Details)
|
||||
> namespace: **VDM\Joomla\Componentbuilder\Compiler\Builder**
|
||||
> extends: **StorageRegistry**
|
||||
```uml
|
||||
@startuml
|
||||
class CustomList << (F,LightGreen) >> #RoyalBlue {
|
||||
}
|
||||
|
||||
@enduml
|
||||
```
|
||||
|
||||
---
|
||||
```
|
||||
██╗ ██████╗██████╗
|
||||
██║██╔════╝██╔══██╗
|
||||
██║██║ ██████╔╝
|
||||
██ ██║██║ ██╔══██╗
|
||||
╚█████╔╝╚██████╗██████╔╝
|
||||
╚════╝ ╚═════╝╚═════╝
|
||||
```
|
||||
> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
<?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
|
||||
*/
|
||||
|
||||
namespace VDM\Joomla\Componentbuilder\Compiler\Builder;
|
||||
|
||||
|
||||
use VDM\Joomla\Interfaces\Storageregistryinterface;
|
||||
use VDM\Joomla\Abstraction\StorageRegistry;
|
||||
|
||||
|
||||
/**
|
||||
* Custom List Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class CustomList extends StorageRegistry implements Storageregistryinterface
|
||||
{
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
###CODEPOWER###
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"add_head": "0",
|
||||
"add_licensing_template": "2",
|
||||
"extends": "7e822c03-1b20-41d1-9427-f5b8d5836af7",
|
||||
"guid": "202f748a-516b-4782-962e-ac9725c3cac4",
|
||||
"implements": [
|
||||
"64e291c2-11f1-423d-a44d-837cc12cc017"
|
||||
],
|
||||
"load_selection": null,
|
||||
"name": "CustomList",
|
||||
"power_version": "1.0.0",
|
||||
"system_name": "JCB.Compiler.Builder.CustomList",
|
||||
"type": "final class",
|
||||
"use_selection": null,
|
||||
"namespace": "VDM\\Joomla\\Componentbuilder.Compiler.Builder.CustomList",
|
||||
"description": "Custom List Builder Class\r\n\r\n@since 3.2.0",
|
||||
"licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/joomla\/Component-Builder>\r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n",
|
||||
"head": "",
|
||||
"composer": ""
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
```
|
||||
██████╗ ██████╗ ██╗ ██╗███████╗██████╗
|
||||
██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗
|
||||
██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝
|
||||
██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗
|
||||
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
|
||||
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
|
||||
```
|
||||
# final class PermissionAction (Details)
|
||||
> namespace: **VDM\Joomla\Componentbuilder\Compiler\Builder**
|
||||
> extends: **MapperDouble**
|
||||
```uml
|
||||
@startuml
|
||||
class PermissionAction << (F,LightGreen) >> #RoyalBlue {
|
||||
# firstKey(string $key) : string
|
||||
# secondKey(string $key) : string
|
||||
}
|
||||
|
||||
note right of PermissionAction::firstKey
|
||||
Model the first key
|
||||
|
||||
since: 3.2.0
|
||||
return: string
|
||||
end note
|
||||
|
||||
note right of PermissionAction::secondKey
|
||||
Model the second key
|
||||
|
||||
since: 3.2.0
|
||||
return: string
|
||||
end note
|
||||
|
||||
@enduml
|
||||
```
|
||||
|
||||
---
|
||||
```
|
||||
██╗ ██████╗██████╗
|
||||
██║██╔════╝██╔══██╗
|
||||
██║██║ ██████╔╝
|
||||
██ ██║██║ ██╔══██╗
|
||||
╚█████╔╝╚██████╗██████╔╝
|
||||
╚════╝ ╚═════╝╚═════╝
|
||||
```
|
||||
> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
<?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
|
||||
*/
|
||||
|
||||
namespace VDM\Joomla\Componentbuilder\Compiler\Builder;
|
||||
|
||||
|
||||
use VDM\Joomla\Componentbuilder\Interfaces\Mapperdoubleinterface;
|
||||
use VDM\Joomla\Componentbuilder\Abstraction\MapperDouble;
|
||||
|
||||
|
||||
/**
|
||||
* Permission Actions Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class PermissionAction extends MapperDouble implements Mapperdoubleinterface
|
||||
{
|
||||
/**
|
||||
* Model the first key
|
||||
*
|
||||
* @param string $key The first key to model
|
||||
*
|
||||
* @return string
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected function firstKey(string $key): string
|
||||
{
|
||||
return $key;
|
||||
}
|
||||
|
||||
/**
|
||||
* Model the second key
|
||||
*
|
||||
* @param string $key The second key to model
|
||||
*
|
||||
* @return string
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected function secondKey(string $key): string
|
||||
{
|
||||
return $key;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
/**
|
||||
* Model the first key
|
||||
*
|
||||
* @param string $key The first key to model
|
||||
*
|
||||
* @return string
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected function firstKey(string $key): string
|
||||
{
|
||||
return $key;
|
||||
}
|
||||
|
||||
/**
|
||||
* Model the second key
|
||||
*
|
||||
* @param string $key The second key to model
|
||||
*
|
||||
* @return string
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected function secondKey(string $key): string
|
||||
{
|
||||
return $key;
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"add_head": "0",
|
||||
"add_licensing_template": "2",
|
||||
"extends": "4d4e76e9-12d9-4d19-b58c-b88974b2586a",
|
||||
"guid": "2528f2bb-6ebc-4d55-9a9d-23ef58534c1a",
|
||||
"implements": [
|
||||
"fbc58009-fa16-4d49-a0dd-419c3b62d42f"
|
||||
],
|
||||
"load_selection": null,
|
||||
"name": "PermissionAction",
|
||||
"power_version": "1.0.0",
|
||||
"system_name": "JCB.Compiler.Builder.PermissionAction",
|
||||
"type": "final class",
|
||||
"use_selection": null,
|
||||
"namespace": "VDM\\Joomla\\Componentbuilder.Compiler.Builder.PermissionAction",
|
||||
"description": "Permission Actions Builder Class\r\n\r\n@since 3.2.0",
|
||||
"licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/joomla\/Component-Builder>\r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n",
|
||||
"head": "",
|
||||
"composer": ""
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
```
|
||||
██████╗ ██████╗ ██╗ ██╗███████╗██████╗
|
||||
██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗
|
||||
██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝
|
||||
██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗
|
||||
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
|
||||
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
|
||||
```
|
||||
# final class ModelWhmcsField (Details)
|
||||
> namespace: **VDM\Joomla\Componentbuilder\Compiler\Builder**
|
||||
> extends: **StorageRegistry**
|
||||
```uml
|
||||
@startuml
|
||||
class ModelWhmcsField << (F,LightGreen) >> #RoyalBlue {
|
||||
}
|
||||
|
||||
@enduml
|
||||
```
|
||||
|
||||
---
|
||||
```
|
||||
██╗ ██████╗██████╗
|
||||
██║██╔════╝██╔══██╗
|
||||
██║██║ ██████╔╝
|
||||
██ ██║██║ ██╔══██╗
|
||||
╚█████╔╝╚██████╗██████╔╝
|
||||
╚════╝ ╚═════╝╚═════╝
|
||||
```
|
||||
> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
<?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
|
||||
*/
|
||||
|
||||
namespace VDM\Joomla\Componentbuilder\Compiler\Builder;
|
||||
|
||||
|
||||
use VDM\Joomla\Interfaces\Storageregistryinterface;
|
||||
use VDM\Joomla\Abstraction\StorageRegistry;
|
||||
|
||||
|
||||
/**
|
||||
* Whmcs Field Model Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class ModelWhmcsField extends StorageRegistry implements Storageregistryinterface
|
||||
{
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
###CODEPOWER###
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"add_head": "0",
|
||||
"add_licensing_template": "2",
|
||||
"extends": "7e822c03-1b20-41d1-9427-f5b8d5836af7",
|
||||
"guid": "28cac2bb-df04-454f-b4d6-923b573eb94e",
|
||||
"implements": [
|
||||
"64e291c2-11f1-423d-a44d-837cc12cc017"
|
||||
],
|
||||
"load_selection": null,
|
||||
"name": "ModelWhmcsField",
|
||||
"power_version": "1.0.0",
|
||||
"system_name": "JCB.Compiler.Builder.ModelWhmcsField",
|
||||
"type": "final class",
|
||||
"use_selection": null,
|
||||
"namespace": "VDM\\Joomla\\Componentbuilder.Compiler.Builder.ModelWhmcsField",
|
||||
"description": "Whmcs Field Model Builder Class\r\n\r\n@since 3.2.0",
|
||||
"licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/joomla\/Component-Builder>\r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n",
|
||||
"head": "",
|
||||
"composer": ""
|
||||
}
|
|
@ -1,101 +0,0 @@
|
|||
```
|
||||
██████╗ ██████╗ ██╗ ██╗███████╗██████╗
|
||||
██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗
|
||||
██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝
|
||||
██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗
|
||||
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
|
||||
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
|
||||
```
|
||||
# interface LoadInterface (Details)
|
||||
> namespace: **VDM\Joomla\Componentbuilder\Interfaces**
|
||||
```uml
|
||||
@startuml
|
||||
interface LoadInterface #Lavender {
|
||||
+ rows(array $select, array $tables, ...) : ?array
|
||||
+ items(array $select, array $tables, ...) : ?array
|
||||
+ row(array $select, array $tables, ...) : ?array
|
||||
+ item(array $select, array $tables, ...) : ?object
|
||||
+ value(array $select, array $tables, ...) : mixed
|
||||
}
|
||||
|
||||
note right of LoadInterface::rows
|
||||
Load data rows as an array of associated arrays
|
||||
|
||||
since: 3.2.0
|
||||
return: ?array
|
||||
|
||||
arguments:
|
||||
array $select
|
||||
array $tables
|
||||
?array $where = null
|
||||
?array $order = null
|
||||
?int $limit = null
|
||||
end note
|
||||
|
||||
note right of LoadInterface::items
|
||||
Load data rows as an array of objects
|
||||
|
||||
since: 3.2.0
|
||||
return: ?array
|
||||
|
||||
arguments:
|
||||
array $select
|
||||
array $tables
|
||||
?array $where = null
|
||||
?array $order = null
|
||||
?int $limit = null
|
||||
end note
|
||||
|
||||
note right of LoadInterface::row
|
||||
Load data row as an associated array
|
||||
|
||||
since: 3.2.0
|
||||
return: ?array
|
||||
|
||||
arguments:
|
||||
array $select
|
||||
array $tables
|
||||
?array $where = null
|
||||
?array $order = null
|
||||
end note
|
||||
|
||||
note right of LoadInterface::item
|
||||
Load data row as an object
|
||||
|
||||
since: 3.2.0
|
||||
return: ?object
|
||||
|
||||
arguments:
|
||||
array $select
|
||||
array $tables
|
||||
?array $where = null
|
||||
?array $order = null
|
||||
end note
|
||||
|
||||
note right of LoadInterface::value
|
||||
Load one value from a row
|
||||
|
||||
since: 3.2.0
|
||||
return: mixed
|
||||
|
||||
arguments:
|
||||
array $select
|
||||
array $tables
|
||||
?array $where = null
|
||||
?array $order = null
|
||||
end note
|
||||
|
||||
@enduml
|
||||
```
|
||||
|
||||
---
|
||||
```
|
||||
██╗ ██████╗██████╗
|
||||
██║██╔════╝██╔══██╗
|
||||
██║██║ ██████╔╝
|
||||
██ ██║██║ ██╔══██╗
|
||||
╚█████╔╝╚██████╗██████╔╝
|
||||
╚════╝ ╚═════╝╚═════╝
|
||||
```
|
||||
> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
||||
|
|
@ -1,92 +0,0 @@
|
|||
<?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
|
||||
*/
|
||||
|
||||
namespace VDM\Joomla\Componentbuilder\Interfaces;
|
||||
|
||||
|
||||
/**
|
||||
* Database Load Interface
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
interface LoadInterface
|
||||
{
|
||||
/**
|
||||
* Load data rows as an array of associated arrays
|
||||
*
|
||||
* @param array $select Array of selection keys
|
||||
* @param array $tables Array of tables to search
|
||||
* @param array|null $where Array of where key=>value match exist
|
||||
* @param array|null $order Array of how to order the data
|
||||
* @param int|null $limit Limit the number of values returned
|
||||
*
|
||||
* @return array|null
|
||||
* @since 3.2.0
|
||||
**/
|
||||
public function rows(array $select, array $tables, ?array $where = null,
|
||||
?array $order = null, ?int $limit = null): ?array;
|
||||
|
||||
/**
|
||||
* Load data rows as an array of objects
|
||||
*
|
||||
* @param array $select Array of selection keys
|
||||
* @param array $tables Array of tables to search
|
||||
* @param array|null $where Array of where key=>value match exist
|
||||
* @param array|null $order Array of how to order the data
|
||||
* @param int|null $limit Limit the number of values returned
|
||||
*
|
||||
* @return array|null
|
||||
* @since 3.2.0
|
||||
**/
|
||||
public function items(array $select, array $tables, ?array $where = null,
|
||||
?array $order = null, ?int $limit = null): ?array;
|
||||
|
||||
/**
|
||||
* Load data row as an associated array
|
||||
*
|
||||
* @param array $select Array of selection keys
|
||||
* @param array $tables Array of tables to search
|
||||
* @param array|null $where Array of where key=>value match exist
|
||||
* @param array|null $order Array of how to order the data
|
||||
*
|
||||
* @return array|null
|
||||
* @since 3.2.0
|
||||
**/
|
||||
public function row(array $select, array $tables, ?array $where = null, ?array $order = null): ?array;
|
||||
|
||||
/**
|
||||
* Load data row as an object
|
||||
*
|
||||
* @param array $select Array of selection keys
|
||||
* @param array $tables Array of tables to search
|
||||
* @param array|null $where Array of where key=>value match exist
|
||||
* @param array|null $order Array of how to order the data
|
||||
*
|
||||
* @return object|null
|
||||
* @since 3.2.0
|
||||
**/
|
||||
public function item(array $select, array $tables, ?array $where = null, ?array $order = null): ?object;
|
||||
|
||||
/**
|
||||
* Load one value from a row
|
||||
*
|
||||
* @param array $select Array of selection keys
|
||||
* @param array $tables Array of tables to search
|
||||
* @param array|null $where Array of where key=>value match exist
|
||||
* @param array|null $order Array of how to order the data
|
||||
*
|
||||
* @return mixed
|
||||
* @since 3.2.0
|
||||
**/
|
||||
public function value(array $select, array $tables, ?array $where = null, ?array $order = null);
|
||||
|
||||
}
|
||||
|
|
@ -1,68 +0,0 @@
|
|||
/**
|
||||
* Load data rows as an array of associated arrays
|
||||
*
|
||||
* @param array $select Array of selection keys
|
||||
* @param array $tables Array of tables to search
|
||||
* @param array|null $where Array of where key=>value match exist
|
||||
* @param array|null $order Array of how to order the data
|
||||
* @param int|null $limit Limit the number of values returned
|
||||
*
|
||||
* @return array|null
|
||||
* @since 3.2.0
|
||||
**/
|
||||
public function rows(array $select, array $tables, ?array $where = null,
|
||||
?array $order = null, ?int $limit = null): ?array;
|
||||
|
||||
/**
|
||||
* Load data rows as an array of objects
|
||||
*
|
||||
* @param array $select Array of selection keys
|
||||
* @param array $tables Array of tables to search
|
||||
* @param array|null $where Array of where key=>value match exist
|
||||
* @param array|null $order Array of how to order the data
|
||||
* @param int|null $limit Limit the number of values returned
|
||||
*
|
||||
* @return array|null
|
||||
* @since 3.2.0
|
||||
**/
|
||||
public function items(array $select, array $tables, ?array $where = null,
|
||||
?array $order = null, ?int $limit = null): ?array;
|
||||
|
||||
/**
|
||||
* Load data row as an associated array
|
||||
*
|
||||
* @param array $select Array of selection keys
|
||||
* @param array $tables Array of tables to search
|
||||
* @param array|null $where Array of where key=>value match exist
|
||||
* @param array|null $order Array of how to order the data
|
||||
*
|
||||
* @return array|null
|
||||
* @since 3.2.0
|
||||
**/
|
||||
public function row(array $select, array $tables, ?array $where = null, ?array $order = null): ?array;
|
||||
|
||||
/**
|
||||
* Load data row as an object
|
||||
*
|
||||
* @param array $select Array of selection keys
|
||||
* @param array $tables Array of tables to search
|
||||
* @param array|null $where Array of where key=>value match exist
|
||||
* @param array|null $order Array of how to order the data
|
||||
*
|
||||
* @return object|null
|
||||
* @since 3.2.0
|
||||
**/
|
||||
public function item(array $select, array $tables, ?array $where = null, ?array $order = null): ?object;
|
||||
|
||||
/**
|
||||
* Load one value from a row
|
||||
*
|
||||
* @param array $select Array of selection keys
|
||||
* @param array $tables Array of tables to search
|
||||
* @param array|null $where Array of where key=>value match exist
|
||||
* @param array|null $order Array of how to order the data
|
||||
*
|
||||
* @return mixed
|
||||
* @since 3.2.0
|
||||
**/
|
||||
public function value(array $select, array $tables, ?array $where = null, ?array $order = null);
|
|
@ -6,15 +6,16 @@
|
|||
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
|
||||
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
|
||||
```
|
||||
# class Mysql (Details)
|
||||
> namespace: **VDM\Joomla\Componentbuilder\Compiler\Builder\Update**
|
||||
# class UpdateMysql (Details)
|
||||
> namespace: **VDM\Joomla\Componentbuilder\Compiler\Builder**
|
||||
> extends: **MapperSingle**
|
||||
```uml
|
||||
@startuml
|
||||
class Mysql #Gold {
|
||||
class UpdateMysql #Gold {
|
||||
# key(string $key) : string
|
||||
}
|
||||
|
||||
note right of Mysql::key
|
||||
note right of UpdateMysql::key
|
||||
Model the key
|
||||
|
||||
since: 3.2.0
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
namespace VDM\Joomla\Componentbuilder\Compiler\Builder\Update;
|
||||
namespace VDM\Joomla\Componentbuilder\Compiler\Builder;
|
||||
|
||||
|
||||
use VDM\Joomla\Componentbuilder\Interfaces\Mappersingleinterface;
|
||||
|
@ -21,7 +21,7 @@ use VDM\Joomla\Componentbuilder\Abstraction\MapperSingle;
|
|||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
class Mysql extends MapperSingle implements Mappersingleinterface
|
||||
class UpdateMysql extends MapperSingle implements Mappersingleinterface
|
||||
{
|
||||
/**
|
||||
* Model the key
|
||||
|
|
|
@ -7,12 +7,12 @@
|
|||
"78527c29-24ad-4735-ad4c-ec33a4952d9b"
|
||||
],
|
||||
"load_selection": null,
|
||||
"name": "Mysql",
|
||||
"name": "UpdateMysql",
|
||||
"power_version": "1.0.0",
|
||||
"system_name": "JCB.Compiler.Builder.Update.Mysql",
|
||||
"system_name": "JCB.Compiler.Builder.UpdateMysql",
|
||||
"type": "class",
|
||||
"use_selection": null,
|
||||
"namespace": "VDM\\Joomla\\Componentbuilder.Compiler.Builder.Update.Mysql",
|
||||
"namespace": "VDM\\Joomla\\Componentbuilder.Compiler.Builder.UpdateMysql",
|
||||
"description": "Compiler Builder Update Mysql\r\n\r\n@since 3.2.0",
|
||||
"licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/joomla\/Component-Builder>\r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n",
|
||||
"head": "",
|
||||
|
|
|
@ -12,7 +12,93 @@
|
|||
@startuml
|
||||
class Builder #Gold {
|
||||
+ register(Container $container) : void
|
||||
+ getMysql(Container $container) : Mysql
|
||||
+ getAccessSwitch(Container $container) : AccessSwitch
|
||||
+ getAccessSwitchList(Container $container) : AccessSwitchList
|
||||
+ getAdminFilterType(Container $container) : AdminFilterType
|
||||
+ getAlias(Container $container) : Alias
|
||||
+ getBaseSixFour(Container $container) : BaseSixFour
|
||||
+ getCategory(Container $container) : Category
|
||||
+ getCategoryCode(Container $container) : CategoryCode
|
||||
+ getCategoryOtherName(Container $container) : CategoryOtherName
|
||||
+ getCheckBox(Container $container) : CheckBox
|
||||
+ getComponentFields(Container $container) : ComponentFields
|
||||
+ getCustomAlias(Container $container) : CustomAlias
|
||||
+ getCustomField(Container $container) : CustomField
|
||||
+ getCustomFieldLinks(Container $container) : CustomFieldLinks
|
||||
+ getCustomList(Container $container) : CustomList
|
||||
+ getCustomTabs(Container $container) : CustomTabs
|
||||
+ getDatabaseKeys(Container $container) : DatabaseKeys
|
||||
+ getDatabaseTables(Container $container) : DatabaseTables
|
||||
+ getDatabaseUniqueGuid(Container $container) : DatabaseUniqueGuid
|
||||
+ getDatabaseUniqueKeys(Container $container) : DatabaseUniqueKeys
|
||||
+ getDoNotEscape(Container $container) : DoNotEscape
|
||||
+ getDynamicFields(Container $container) : DynamicFields
|
||||
+ getExtensionCustomFields(Container $container) : ExtensionCustomFields
|
||||
+ getFieldGroupControl(Container $container) : FieldGroupControl
|
||||
+ getFieldNames(Container $container) : FieldNames
|
||||
+ getFieldRelations(Container $container) : FieldRelations
|
||||
+ getFilter(Container $container) : Filter
|
||||
+ getFootableScripts(Container $container) : FootableScripts
|
||||
+ getGetAsLookup(Container $container) : GetAsLookup
|
||||
+ getGetModule(Container $container) : GetModule
|
||||
+ getGoogleChart(Container $container) : GoogleChart
|
||||
+ getHasPermissions(Container $container) : HasPermissions
|
||||
+ getHiddenFields(Container $container) : HiddenFields
|
||||
+ getHistory(Container $container) : History
|
||||
+ getIntegerFields(Container $container) : IntegerFields
|
||||
+ getItemsMethodEximportString(Container $container) : ItemsMethodEximportString
|
||||
+ getItemsMethodListString(Container $container) : ItemsMethodListString
|
||||
+ getJsonItem(Container $container) : JsonItem
|
||||
+ getJsonItemArray(Container $container) : JsonItemArray
|
||||
+ getJsonString(Container $container) : JsonString
|
||||
+ getLayout(Container $container) : Layout
|
||||
+ getLayoutData(Container $container) : LayoutData
|
||||
+ getLibraryManager(Container $container) : LibraryManager
|
||||
+ getListFieldClass(Container $container) : ListFieldClass
|
||||
+ getListHeadOverride(Container $container) : ListHeadOverride
|
||||
+ getListJoin(Container $container) : ListJoin
|
||||
+ getLists(Container $container) : Lists
|
||||
+ getMainTextField(Container $container) : MainTextField
|
||||
+ getMetaData(Container $container) : MetaData
|
||||
+ getModelBasicField(Container $container) : ModelBasicField
|
||||
+ getModelExpertField(Container $container) : ModelExpertField
|
||||
+ getModelExpertFieldInitiator(Container $container) : ModelExpertFieldInitiator
|
||||
+ getModelMediumField(Container $container) : ModelMediumField
|
||||
+ getModelWhmcsField(Container $container) : ModelWhmcsField
|
||||
+ getMovedPublishingFields(Container $container) : MovedPublishingFields
|
||||
+ getMysqlTableSetting(Container $container) : MysqlTableSetting
|
||||
+ getNewPublishingFields(Container $container) : NewPublishingFields
|
||||
+ getOrderZero(Container $container) : OrderZero
|
||||
+ getOtherFilter(Container $container) : OtherFilter
|
||||
+ getOtherGroup(Container $container) : OtherGroup
|
||||
+ getOtherJoin(Container $container) : OtherJoin
|
||||
+ getOtherOrder(Container $container) : OtherOrder
|
||||
+ getOtherQuery(Container $container) : OtherQuery
|
||||
+ getOtherWhere(Container $container) : OtherWhere
|
||||
+ getPermissionAction(Container $container) : PermissionAction
|
||||
+ getPermissionComponent(Container $container) : PermissionComponent
|
||||
+ getPermissionCore(Container $container) : PermissionCore
|
||||
+ getPermissionDashboard(Container $container) : PermissionDashboard
|
||||
+ getPermissionGlobalAction(Container $container) : PermissionGlobalAction
|
||||
+ getPermissionViews(Container $container) : PermissionViews
|
||||
+ getScriptMediaSwitch(Container $container) : ScriptMediaSwitch
|
||||
+ getScriptUserSwitch(Container $container) : ScriptUserSwitch
|
||||
+ getSearch(Container $container) : Search
|
||||
+ getSelectionTranslation(Container $container) : SelectionTranslation
|
||||
+ getSiteDecrypt(Container $container) : SiteDecrypt
|
||||
+ getSiteDynamicGet(Container $container) : SiteDynamicGet
|
||||
+ getSiteEditView(Container $container) : SiteEditView
|
||||
+ getSiteFieldData(Container $container) : SiteFieldData
|
||||
+ getSiteFieldDecodeFilter(Container $container) : SiteFieldDecodeFilter
|
||||
+ getSiteFields(Container $container) : SiteFields
|
||||
+ getSiteMainGet(Container $container) : SiteMainGet
|
||||
+ getSort(Container $container) : Sort
|
||||
+ getTabCounter(Container $container) : TabCounter
|
||||
+ getTags(Container $container) : Tags
|
||||
+ getTemplateData(Container $container) : TemplateData
|
||||
+ getTitle(Container $container) : Title
|
||||
+ getUikitComp(Container $container) : UikitComp
|
||||
+ getUpdateMysql(Container $container) : UpdateMysql
|
||||
}
|
||||
|
||||
note right of Builder::register
|
||||
|
@ -22,11 +108,613 @@ note right of Builder::register
|
|||
return: void
|
||||
end note
|
||||
|
||||
note right of Builder::getMysql
|
||||
Get the Compiler Builder Mysql
|
||||
note left of Builder::getAccessSwitch
|
||||
Get The AccessSwitch Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: Mysql
|
||||
return: AccessSwitch
|
||||
end note
|
||||
|
||||
note right of Builder::getAccessSwitchList
|
||||
Get The AccessSwitchList Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: AccessSwitchList
|
||||
end note
|
||||
|
||||
note left of Builder::getAdminFilterType
|
||||
Get The AdminFilterType Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: AdminFilterType
|
||||
end note
|
||||
|
||||
note right of Builder::getAlias
|
||||
Get The Alias Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: Alias
|
||||
end note
|
||||
|
||||
note left of Builder::getBaseSixFour
|
||||
Get The BaseSixFour Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: BaseSixFour
|
||||
end note
|
||||
|
||||
note right of Builder::getCategory
|
||||
Get The Category Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: Category
|
||||
end note
|
||||
|
||||
note left of Builder::getCategoryCode
|
||||
Get The CategoryCode Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: CategoryCode
|
||||
end note
|
||||
|
||||
note right of Builder::getCategoryOtherName
|
||||
Get The CategoryOtherName Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: CategoryOtherName
|
||||
end note
|
||||
|
||||
note left of Builder::getCheckBox
|
||||
Get The CheckBox Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: CheckBox
|
||||
end note
|
||||
|
||||
note right of Builder::getComponentFields
|
||||
Get The ComponentFields Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: ComponentFields
|
||||
end note
|
||||
|
||||
note left of Builder::getCustomAlias
|
||||
Get The CustomAlias Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: CustomAlias
|
||||
end note
|
||||
|
||||
note right of Builder::getCustomField
|
||||
Get The CustomField Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: CustomField
|
||||
end note
|
||||
|
||||
note left of Builder::getCustomFieldLinks
|
||||
Get The CustomFieldLinks Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: CustomFieldLinks
|
||||
end note
|
||||
|
||||
note right of Builder::getCustomList
|
||||
Get The CustomList Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: CustomList
|
||||
end note
|
||||
|
||||
note left of Builder::getCustomTabs
|
||||
Get The CustomTabs Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: CustomTabs
|
||||
end note
|
||||
|
||||
note right of Builder::getDatabaseKeys
|
||||
Get The DatabaseKeys Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: DatabaseKeys
|
||||
end note
|
||||
|
||||
note left of Builder::getDatabaseTables
|
||||
Get The DatabaseTables Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: DatabaseTables
|
||||
end note
|
||||
|
||||
note right of Builder::getDatabaseUniqueGuid
|
||||
Get The DatabaseUniqueGuid Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: DatabaseUniqueGuid
|
||||
end note
|
||||
|
||||
note left of Builder::getDatabaseUniqueKeys
|
||||
Get The DatabaseUniqueKeys Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: DatabaseUniqueKeys
|
||||
end note
|
||||
|
||||
note right of Builder::getDoNotEscape
|
||||
Get The DoNotEscape Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: DoNotEscape
|
||||
end note
|
||||
|
||||
note left of Builder::getDynamicFields
|
||||
Get The DynamicFields Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: DynamicFields
|
||||
end note
|
||||
|
||||
note right of Builder::getExtensionCustomFields
|
||||
Get The ExtensionCustomFields Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: ExtensionCustomFields
|
||||
end note
|
||||
|
||||
note left of Builder::getFieldGroupControl
|
||||
Get The FieldGroupControl Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: FieldGroupControl
|
||||
end note
|
||||
|
||||
note right of Builder::getFieldNames
|
||||
Get The FieldNames Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: FieldNames
|
||||
end note
|
||||
|
||||
note left of Builder::getFieldRelations
|
||||
Get The FieldRelations Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: FieldRelations
|
||||
end note
|
||||
|
||||
note right of Builder::getFilter
|
||||
Get The Filter Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: Filter
|
||||
end note
|
||||
|
||||
note left of Builder::getFootableScripts
|
||||
Get The FootableScripts Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: FootableScripts
|
||||
end note
|
||||
|
||||
note right of Builder::getGetAsLookup
|
||||
Get The GetAsLookup Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: GetAsLookup
|
||||
end note
|
||||
|
||||
note left of Builder::getGetModule
|
||||
Get The GetModule Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: GetModule
|
||||
end note
|
||||
|
||||
note right of Builder::getGoogleChart
|
||||
Get The GoogleChart Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: GoogleChart
|
||||
end note
|
||||
|
||||
note left of Builder::getHasPermissions
|
||||
Get The HasPermissions Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: HasPermissions
|
||||
end note
|
||||
|
||||
note right of Builder::getHiddenFields
|
||||
Get The HiddenFields Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: HiddenFields
|
||||
end note
|
||||
|
||||
note left of Builder::getHistory
|
||||
Get The History Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: History
|
||||
end note
|
||||
|
||||
note right of Builder::getIntegerFields
|
||||
Get The IntegerFields Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: IntegerFields
|
||||
end note
|
||||
|
||||
note left of Builder::getItemsMethodEximportString
|
||||
Get The ItemsMethodEximportString Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: ItemsMethodEximportString
|
||||
end note
|
||||
|
||||
note right of Builder::getItemsMethodListString
|
||||
Get The ItemsMethodListString Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: ItemsMethodListString
|
||||
end note
|
||||
|
||||
note left of Builder::getJsonItem
|
||||
Get The JsonItem Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: JsonItem
|
||||
end note
|
||||
|
||||
note right of Builder::getJsonItemArray
|
||||
Get The JsonItemArray Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: JsonItemArray
|
||||
end note
|
||||
|
||||
note left of Builder::getJsonString
|
||||
Get The JsonString Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: JsonString
|
||||
end note
|
||||
|
||||
note right of Builder::getLayout
|
||||
Get The Layout Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: Layout
|
||||
end note
|
||||
|
||||
note left of Builder::getLayoutData
|
||||
Get The LayoutData Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: LayoutData
|
||||
end note
|
||||
|
||||
note right of Builder::getLibraryManager
|
||||
Get The LibraryManager Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: LibraryManager
|
||||
end note
|
||||
|
||||
note left of Builder::getListFieldClass
|
||||
Get The ListFieldClass Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: ListFieldClass
|
||||
end note
|
||||
|
||||
note right of Builder::getListHeadOverride
|
||||
Get The ListHeadOverride Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: ListHeadOverride
|
||||
end note
|
||||
|
||||
note left of Builder::getListJoin
|
||||
Get The ListJoin Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: ListJoin
|
||||
end note
|
||||
|
||||
note right of Builder::getLists
|
||||
Get The Lists Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: Lists
|
||||
end note
|
||||
|
||||
note left of Builder::getMainTextField
|
||||
Get The MainTextField Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: MainTextField
|
||||
end note
|
||||
|
||||
note right of Builder::getMetaData
|
||||
Get The MetaData Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: MetaData
|
||||
end note
|
||||
|
||||
note left of Builder::getModelBasicField
|
||||
Get The ModelBasicField Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: ModelBasicField
|
||||
end note
|
||||
|
||||
note right of Builder::getModelExpertField
|
||||
Get The ModelExpertField Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: ModelExpertField
|
||||
end note
|
||||
|
||||
note left of Builder::getModelExpertFieldInitiator
|
||||
Get The ModelExpertFieldInitiator Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: ModelExpertFieldInitiator
|
||||
end note
|
||||
|
||||
note right of Builder::getModelMediumField
|
||||
Get The ModelMediumField Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: ModelMediumField
|
||||
end note
|
||||
|
||||
note left of Builder::getModelWhmcsField
|
||||
Get The ModelWhmcsField Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: ModelWhmcsField
|
||||
end note
|
||||
|
||||
note right of Builder::getMovedPublishingFields
|
||||
Get The MovedPublishingFields Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: MovedPublishingFields
|
||||
end note
|
||||
|
||||
note left of Builder::getMysqlTableSetting
|
||||
Get The MysqlTableSetting Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: MysqlTableSetting
|
||||
end note
|
||||
|
||||
note right of Builder::getNewPublishingFields
|
||||
Get The NewPublishingFields Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: NewPublishingFields
|
||||
end note
|
||||
|
||||
note left of Builder::getOrderZero
|
||||
Get The OrderZero Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: OrderZero
|
||||
end note
|
||||
|
||||
note right of Builder::getOtherFilter
|
||||
Get The OtherFilter Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: OtherFilter
|
||||
end note
|
||||
|
||||
note left of Builder::getOtherGroup
|
||||
Get The OtherGroup Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: OtherGroup
|
||||
end note
|
||||
|
||||
note right of Builder::getOtherJoin
|
||||
Get The OtherJoin Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: OtherJoin
|
||||
end note
|
||||
|
||||
note left of Builder::getOtherOrder
|
||||
Get The OtherOrder Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: OtherOrder
|
||||
end note
|
||||
|
||||
note right of Builder::getOtherQuery
|
||||
Get The OtherQuery Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: OtherQuery
|
||||
end note
|
||||
|
||||
note left of Builder::getOtherWhere
|
||||
Get The OtherWhere Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: OtherWhere
|
||||
end note
|
||||
|
||||
note right of Builder::getPermissionAction
|
||||
Get The PermissionAction Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: PermissionAction
|
||||
end note
|
||||
|
||||
note left of Builder::getPermissionComponent
|
||||
Get The PermissionComponent Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: PermissionComponent
|
||||
end note
|
||||
|
||||
note right of Builder::getPermissionCore
|
||||
Get The PermissionCore Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: PermissionCore
|
||||
end note
|
||||
|
||||
note left of Builder::getPermissionDashboard
|
||||
Get The PermissionDashboard Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: PermissionDashboard
|
||||
end note
|
||||
|
||||
note right of Builder::getPermissionGlobalAction
|
||||
Get The PermissionGlobalAction Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: PermissionGlobalAction
|
||||
end note
|
||||
|
||||
note left of Builder::getPermissionViews
|
||||
Get The PermissionViews Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: PermissionViews
|
||||
end note
|
||||
|
||||
note right of Builder::getScriptMediaSwitch
|
||||
Get The ScriptMediaSwitch Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: ScriptMediaSwitch
|
||||
end note
|
||||
|
||||
note left of Builder::getScriptUserSwitch
|
||||
Get The ScriptUserSwitch Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: ScriptUserSwitch
|
||||
end note
|
||||
|
||||
note right of Builder::getSearch
|
||||
Get The Search Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: Search
|
||||
end note
|
||||
|
||||
note left of Builder::getSelectionTranslation
|
||||
Get The SelectionTranslation Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: SelectionTranslation
|
||||
end note
|
||||
|
||||
note right of Builder::getSiteDecrypt
|
||||
Get The SiteDecrypt Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: SiteDecrypt
|
||||
end note
|
||||
|
||||
note left of Builder::getSiteDynamicGet
|
||||
Get The SiteDynamicGet Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: SiteDynamicGet
|
||||
end note
|
||||
|
||||
note right of Builder::getSiteEditView
|
||||
Get The SiteEditView Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: SiteEditView
|
||||
end note
|
||||
|
||||
note left of Builder::getSiteFieldData
|
||||
Get The SiteFieldData Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: SiteFieldData
|
||||
end note
|
||||
|
||||
note right of Builder::getSiteFieldDecodeFilter
|
||||
Get The SiteFieldDecodeFilter Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: SiteFieldDecodeFilter
|
||||
end note
|
||||
|
||||
note left of Builder::getSiteFields
|
||||
Get The SiteFields Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: SiteFields
|
||||
end note
|
||||
|
||||
note right of Builder::getSiteMainGet
|
||||
Get The SiteMainGet Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: SiteMainGet
|
||||
end note
|
||||
|
||||
note left of Builder::getSort
|
||||
Get The Sort Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: Sort
|
||||
end note
|
||||
|
||||
note right of Builder::getTabCounter
|
||||
Get The TabCounter Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: TabCounter
|
||||
end note
|
||||
|
||||
note left of Builder::getTags
|
||||
Get The Tags Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: Tags
|
||||
end note
|
||||
|
||||
note right of Builder::getTemplateData
|
||||
Get The TemplateData Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: TemplateData
|
||||
end note
|
||||
|
||||
note left of Builder::getTitle
|
||||
Get The Title Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: Title
|
||||
end note
|
||||
|
||||
note right of Builder::getUikitComp
|
||||
Get The UikitComp Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: UikitComp
|
||||
end note
|
||||
|
||||
note left of Builder::getUpdateMysql
|
||||
Get The UpdateMysql Class.
|
||||
|
||||
since: 3.2.0
|
||||
return: UpdateMysql
|
||||
end note
|
||||
|
||||
@enduml
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -13,6 +13,350 @@
|
|||
"type": "class",
|
||||
"use_selection": {
|
||||
"use_selection0": {
|
||||
"use": "e38a5276-6664-4bc6-8002-0562fcc248f8",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection1": {
|
||||
"use": "81212121-ad5c-43c5-b046-f2650864f690",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection2": {
|
||||
"use": "9481caa2-6d04-4598-8320-543a93927243",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection3": {
|
||||
"use": "fe87df7f-b65f-4778-8875-6122ab6b025f",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection4": {
|
||||
"use": "b8b474d4-30e3-4b5a-9988-3adb3450998c",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection5": {
|
||||
"use": "007177eb-d39d-4093-8840-07a38811c502",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection6": {
|
||||
"use": "b24f5184-7e7c-448d-9475-ff3f998f70c3",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection7": {
|
||||
"use": "a1e551a9-8369-48c9-a076-4e5beb65e0df",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection8": {
|
||||
"use": "8561f1f6-96c7-4e54-8869-0132116d57ce",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection9": {
|
||||
"use": "3230dd65-6590-4043-9bb8-bebd6d8224b2",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection10": {
|
||||
"use": "9d74d613-5ef7-4cf1-9f12-64f0a8e19806",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection11": {
|
||||
"use": "87d1da23-08d6-4fbf-bd0d-b746da240b8a",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection12": {
|
||||
"use": "a4857c60-680c-4e0c-ae8f-9250a7b5e317",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection13": {
|
||||
"use": "202f748a-516b-4782-962e-ac9725c3cac4",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection14": {
|
||||
"use": "9551b683-67b6-4367-bb14-4b016def37e3",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection15": {
|
||||
"use": "0d8db719-39a6-48b4-85a6-2f97e784e588",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection16": {
|
||||
"use": "b3c36de1-9b18-4ea8-8383-6ab8f0e33996",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection17": {
|
||||
"use": "58b7f907-4195-4ca3-886c-17877be59887",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection18": {
|
||||
"use": "ce0899a9-6271-4fc4-800a-697c122bb112",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection19": {
|
||||
"use": "0d9d3294-0bed-4c44-b1a1-e172f62cafb2",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection20": {
|
||||
"use": "1ae9a8e8-59f7-4844-a08d-9a4dce4be076",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection86": {
|
||||
"use": "e9b6b06b-f600-4f9d-984d-79c70ae7ae92",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection21": {
|
||||
"use": "d5530adf-c809-45a9-87fc-7cecd3d972d8",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection22": {
|
||||
"use": "961a2a2e-9f95-4b5f-b1c0-62ee783f9c66",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection23": {
|
||||
"use": "a090a472-eb3d-4086-a6d5-4215e1b1851f",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection24": {
|
||||
"use": "e4e65c5b-00ec-439c-96bf-3153c3a73398",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection25": {
|
||||
"use": "dba0776e-e582-4f73-af3e-e7ed17bc34b3",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection26": {
|
||||
"use": "8f46f85d-7921-44e9-a40e-dc4f01c5d43a",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection27": {
|
||||
"use": "c7b6f0d5-ec47-4166-915c-e78d49b4fb63",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection28": {
|
||||
"use": "507ab90f-7d64-4697-9815-d96f5d1d1185",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection29": {
|
||||
"use": "e54965e7-34fd-481e-b40c-4da089afec5a",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection30": {
|
||||
"use": "0b45357f-b077-4337-92f3-65c1e19d36cd",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection31": {
|
||||
"use": "2cb33994-052e-42dd-adbc-3ea9f932816f",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection32": {
|
||||
"use": "952423ba-015a-4104-89a4-030695aa4d15",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection33": {
|
||||
"use": "1f086665-c007-4085-b363-3a118659ff1b",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection34": {
|
||||
"use": "972c4de9-6f6f-463b-8eea-cc7cbdb96aba",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection35": {
|
||||
"use": "45652787-9085-4c67-914f-0da25ae62646",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection36": {
|
||||
"use": "6b386f2e-3eb1-4f60-81af-a90c8da1ffeb",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection37": {
|
||||
"use": "bb26cf63-69a5-4c43-b2df-43284c9d907d",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection38": {
|
||||
"use": "a90a2495-9c26-446c-867e-9ee8f42fb6af",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection39": {
|
||||
"use": "7415fdb4-5719-40b7-b01f-05588e968b47",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection40": {
|
||||
"use": "e696927b-e8f4-4cfc-9d25-215db4e3c7a8",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection41": {
|
||||
"use": "c8c5d364-d2bf-41c0-8c64-6b6fed1a28b6",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection42": {
|
||||
"use": "7506a35c-fa32-44ab-bd41-363439b20b82",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection43": {
|
||||
"use": "597663e1-1c02-43e8-aea5-f2161e38ac7f",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection44": {
|
||||
"use": "4a857023-2d96-4649-9ed5-910d0329854d",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection45": {
|
||||
"use": "c6de9da0-1a73-4c73-b355-7fe02efe4c9d",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection46": {
|
||||
"use": "f052eeef-5112-4efe-98c8-8c7db69dc2d1",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection47": {
|
||||
"use": "a5189bfe-6d15-4452-9fa5-e3e57f7fa791",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection48": {
|
||||
"use": "b8a92303-8543-4d88-a83c-ece300eaba6d",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection49": {
|
||||
"use": "3468b447-a929-4c28-84a1-f2c3a27e3127",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection50": {
|
||||
"use": "b0b26749-5e2c-4b56-8982-48172f2531fa",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection51": {
|
||||
"use": "28cac2bb-df04-454f-b4d6-923b573eb94e",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection52": {
|
||||
"use": "9cdff2af-bd1b-452f-810e-d034b9720d2a",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection53": {
|
||||
"use": "9ff6d6cd-afea-4f15-a67b-fd132d386989",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection54": {
|
||||
"use": "0f141480-afe6-41fb-996c-2a4e566a2f0d",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection55": {
|
||||
"use": "66b7b5f8-60d6-427a-9f8c-84c11a3d6780",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection56": {
|
||||
"use": "9d1eec29-f304-4b08-a3e7-8b2d6b1f4a1f",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection57": {
|
||||
"use": "bf92e1c1-3d5e-4e9d-a585-c79e1468df33",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection58": {
|
||||
"use": "46b02edb-427e-4c26-a5cb-279828eb4433",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection59": {
|
||||
"use": "3f83fe11-1ef6-4020-bd73-f3bb58cefe3a",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection60": {
|
||||
"use": "74595661-236d-4aa1-99f3-358d093000be",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection61": {
|
||||
"use": "fd885c23-88dd-440a-9b05-d02a2b2962f9",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection62": {
|
||||
"use": "2528f2bb-6ebc-4d55-9a9d-23ef58534c1a",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection63": {
|
||||
"use": "94f4939f-82cc-4196-802b-1346ce5c7f99",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection64": {
|
||||
"use": "5e3d856d-8174-4131-b4e9-9328066438e1",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection65": {
|
||||
"use": "e046b530-47fe-406f-b45a-b5eec8cbb238",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection66": {
|
||||
"use": "a601888d-12b6-427f-94ae-95004206e24e",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection67": {
|
||||
"use": "480d11b9-783b-45d5-bce1-b0c2fcaad08a",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection68": {
|
||||
"use": "17bf80af-3609-4f36-a520-be1a339c278b",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection69": {
|
||||
"use": "9042fac6-5ca5-4ebe-94fe-cf9b0718ed36",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection70": {
|
||||
"use": "2e764839-8ec6-4726-af50-b5678e0714a4",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection71": {
|
||||
"use": "d8e46d2c-d63e-4b92-80a2-d17638a7ae9e",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection72": {
|
||||
"use": "c0e46033-5ade-4829-88b7-ca160d36a4d1",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection73": {
|
||||
"use": "ec0682ee-9166-48f8-951b-9b763792c1d1",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection74": {
|
||||
"use": "abdb7d20-a15e-42d8-bd91-7b09514df7f2",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection75": {
|
||||
"use": "33f5131e-4a5b-414b-95dd-d22227c2666d",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection76": {
|
||||
"use": "d393c946-4481-43fa-b737-449119dd0a63",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection77": {
|
||||
"use": "52de0ac8-bb9d-4a45-bd2a-a44c48c17ffe",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection78": {
|
||||
"use": "17fa7789-a7d1-465e-b733-8c8d53f5ca1b",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection79": {
|
||||
"use": "94e0beae-7daa-43b2-81b9-0bde390a76d8",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection80": {
|
||||
"use": "d645881c-ae8c-4828-a217-6bad98cd3b44",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection81": {
|
||||
"use": "8ca30d59-e56a-4cdd-bd8c-d9aad28f5903",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection82": {
|
||||
"use": "8591f6db-dd3c-4a63-9b3f-574c0ec74ade",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection83": {
|
||||
"use": "6a1dddb3-a955-425e-b713-8ef81f256035",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection84": {
|
||||
"use": "54ec57f6-2fc3-42e5-975e-1fabeacb845d",
|
||||
"as": "default"
|
||||
},
|
||||
"use_selection85": {
|
||||
"use": "2b5c9989-1d4e-4f59-8b95-5cd2f72f82d9",
|
||||
"as": "default"
|
||||
}
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
```
|
||||
██████╗ ██████╗ ██╗ ██╗███████╗██████╗
|
||||
██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗
|
||||
██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝
|
||||
██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗
|
||||
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
|
||||
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
|
||||
```
|
||||
# final class History (Details)
|
||||
> namespace: **VDM\Joomla\Componentbuilder\Compiler\Builder**
|
||||
> extends: **StorageRegistry**
|
||||
```uml
|
||||
@startuml
|
||||
class History << (F,LightGreen) >> #RoyalBlue {
|
||||
}
|
||||
|
||||
@enduml
|
||||
```
|
||||
|
||||
---
|
||||
```
|
||||
██╗ ██████╗██████╗
|
||||
██║██╔════╝██╔══██╗
|
||||
██║██║ ██████╔╝
|
||||
██ ██║██║ ██╔══██╗
|
||||
╚█████╔╝╚██████╗██████╔╝
|
||||
╚════╝ ╚═════╝╚═════╝
|
||||
```
|
||||
> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
<?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
|
||||
*/
|
||||
|
||||
namespace VDM\Joomla\Componentbuilder\Compiler\Builder;
|
||||
|
||||
|
||||
use VDM\Joomla\Interfaces\Storageregistryinterface;
|
||||
use VDM\Joomla\Abstraction\StorageRegistry;
|
||||
|
||||
|
||||
/**
|
||||
* History Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class History extends StorageRegistry implements Storageregistryinterface
|
||||
{
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
###CODEPOWER###
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"add_head": "0",
|
||||
"add_licensing_template": "2",
|
||||
"extends": "7e822c03-1b20-41d1-9427-f5b8d5836af7",
|
||||
"guid": "2cb33994-052e-42dd-adbc-3ea9f932816f",
|
||||
"implements": [
|
||||
"64e291c2-11f1-423d-a44d-837cc12cc017"
|
||||
],
|
||||
"load_selection": null,
|
||||
"name": "History",
|
||||
"power_version": "1.0.0",
|
||||
"system_name": "JCB.Compiler.Builder.History",
|
||||
"type": "final class",
|
||||
"use_selection": null,
|
||||
"namespace": "VDM\\Joomla\\Componentbuilder.Compiler.Builder.History",
|
||||
"description": "History Builder Class\r\n\r\n@since 3.2.0",
|
||||
"licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/joomla\/Component-Builder>\r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n",
|
||||
"head": "",
|
||||
"composer": ""
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
```
|
||||
██████╗ ██████╗ ██╗ ██╗███████╗██████╗
|
||||
██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗
|
||||
██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝
|
||||
██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗
|
||||
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
|
||||
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
|
||||
```
|
||||
# interface Fieldtypeinterface (Details)
|
||||
> namespace: **VDM\Joomla\Componentbuilder\Compiler\Interfaces\Creator**
|
||||
```uml
|
||||
@startuml
|
||||
interface Fieldtypeinterface #Lavender {
|
||||
+ get(string $setType, array $fieldAttributes, ...) : mixed
|
||||
}
|
||||
|
||||
note right of Fieldtypeinterface::get
|
||||
Create a field
|
||||
|
||||
since: 3.2.0
|
||||
return: mixed
|
||||
|
||||
arguments:
|
||||
string $setType
|
||||
array $fieldAttributes
|
||||
string $name
|
||||
string $typeName
|
||||
string $langView
|
||||
string $nameSingleCode
|
||||
string $nameListCode
|
||||
array $placeholders
|
||||
array|null $optionArray
|
||||
?array $custom = null
|
||||
string $taber = ''
|
||||
end note
|
||||
|
||||
@enduml
|
||||
```
|
||||
|
||||
---
|
||||
```
|
||||
██╗ ██████╗██████╗
|
||||
██║██╔════╝██╔══██╗
|
||||
██║██║ ██████╔╝
|
||||
██ ██║██║ ██╔══██╗
|
||||
╚█████╔╝╚██████╗██████╔╝
|
||||
╚════╝ ╚═════╝╚═════╝
|
||||
```
|
||||
> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue