Release of v4.0.0-alpha8
Add power path override option on component level. Fix the sql build feature. #1032.
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
<?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\Abstraction;
|
||||
|
||||
|
||||
use Joomla\Registry\Registry as JoomlaRegistry;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\Input\Input;
|
||||
use VDM\Joomla\Abstraction\BaseConfig as Config;
|
||||
use VDM\Joomla\Utilities\Component\Helper;
|
||||
use VDM\Joomla\Utilities\String\ClassfunctionHelper;
|
||||
|
||||
|
||||
/**
|
||||
* Config
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
abstract class BaseConfig extends Config
|
||||
{
|
||||
/**
|
||||
* Hold a JInput object for easier access to the input variables.
|
||||
*
|
||||
* @var Input
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Input $input;
|
||||
|
||||
/**
|
||||
* The Params
|
||||
*
|
||||
* @var JoomlaRegistry
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected JoomlaRegistry $params;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param Input|null $input Input
|
||||
* @param Registry|null $params The component parameters
|
||||
*
|
||||
* @throws \Exception
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function __construct(?Input $input = null, ?JoomlaRegistry $params = null)
|
||||
{
|
||||
$this->input = $input ?: Factory::getApplication()->input;
|
||||
$this->params = $params ?: Helper::getParams('com_componentbuilder');
|
||||
|
||||
// run parent constructor
|
||||
parent::__construct();
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,150 @@
|
||||
<?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\Abstraction;
|
||||
|
||||
|
||||
use Joomla\Registry\Registry as JoomlaRegistry;
|
||||
|
||||
|
||||
/**
|
||||
* Registry
|
||||
*
|
||||
* So we have full control over this class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
abstract class BaseRegistry extends JoomlaRegistry implements \JsonSerializable, \ArrayAccess, \IteratorAggregate, \Countable
|
||||
{
|
||||
/**
|
||||
* Method to iterate over any part of the registry
|
||||
*
|
||||
* @param string $path Registry path (e.g. joomla.content.showauthor)
|
||||
*
|
||||
* @return \ArrayIterator|null This object represented as an ArrayIterator.
|
||||
*
|
||||
* @since 3.4.0
|
||||
*/
|
||||
public function _(string $path): ?\ArrayIterator
|
||||
{
|
||||
$data = $this->extract($path);
|
||||
|
||||
if ($data === null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return $data->getIterator();
|
||||
}
|
||||
|
||||
/**
|
||||
* Append value to a path in registry of an array
|
||||
*
|
||||
* @param string $path Parent registry Path (e.g. joomla.content.showauthor)
|
||||
* @param mixed $value Value of entry
|
||||
*
|
||||
* @return mixed The value of the that has been set.
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function appendArray(string $path, $value)
|
||||
{
|
||||
// check if it does not exist
|
||||
if (!$this->exists($path))
|
||||
{
|
||||
$this->set($path, []);
|
||||
}
|
||||
|
||||
return $this->append($path, $value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a registry path exists and is an array
|
||||
*
|
||||
* @param string $path Registry path (e.g. joomla.content.showauthor)
|
||||
*
|
||||
* @return boolean
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function isArray(string $path): bool
|
||||
{
|
||||
// Return default value if path is empty
|
||||
if (empty($path)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// get the value
|
||||
if (($node = $this->get($path)) !== null
|
||||
&& is_array($node)
|
||||
&& $node !== [])
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a registry path exists and is a string
|
||||
*
|
||||
* @param string $path Registry path (e.g. joomla.content.showauthor)
|
||||
*
|
||||
* @return boolean
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function isString(string $path): bool
|
||||
{
|
||||
// Return default value if path is empty
|
||||
if (empty($path)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// get the value
|
||||
if (($node = $this->get($path)) !== null
|
||||
&& is_string($node)
|
||||
&& strlen((string) $node) > 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a registry path exists and is numeric
|
||||
*
|
||||
* @param string $path Registry path (e.g. joomla.content.showauthor)
|
||||
*
|
||||
* @return boolean
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function isNumeric(string $path): bool
|
||||
{
|
||||
// Return default value if path is empty
|
||||
if (empty($path)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// get the value
|
||||
if (($node = $this->get($path)) !== null
|
||||
&& is_numeric($node))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
@@ -0,0 +1,515 @@
|
||||
<?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\Adminview;
|
||||
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Config;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Interfaces\EventInterface as Event;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Placeholder;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Customcode\Dispenser;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Model\CustomtabsInterface as Customtabs;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Model\Tabs;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Model\Fields;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Model\Historyadminview as History;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Model\Permissions;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Model\Conditions;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Model\Relations;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Model\Linkedviews;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Model\Javascriptadminview as Javascript;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Model\Cssadminview as Css;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Model\Phpadminview as Php;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Model\Custombuttons;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Model\Customimportscripts;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Model\Ajaxadmin as Ajax;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Model\Customalias;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Model\Sql;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Model\Mysqlsettings;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Builder\SiteEditView;
|
||||
use VDM\Joomla\Utilities\StringHelper;
|
||||
use VDM\Joomla\Utilities\JsonHelper;
|
||||
use VDM\Joomla\Utilities\ArrayHelper;
|
||||
|
||||
|
||||
/**
|
||||
* Admin View Data Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
class Data
|
||||
{
|
||||
/**
|
||||
* The Config Class.
|
||||
*
|
||||
* @var Config
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Config $config;
|
||||
|
||||
/**
|
||||
* The EventInterface Class.
|
||||
*
|
||||
* @var Event
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Event $event;
|
||||
|
||||
/**
|
||||
* The Placeholder Class.
|
||||
*
|
||||
* @var Placeholder
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Placeholder $placeholder;
|
||||
|
||||
/**
|
||||
* The Dispenser Class.
|
||||
*
|
||||
* @var Dispenser
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Dispenser $dispenser;
|
||||
|
||||
/**
|
||||
* The Customtabs Class.
|
||||
*
|
||||
* @var Customtabs
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Customtabs $customtabs;
|
||||
|
||||
/**
|
||||
* The Tabs Class.
|
||||
*
|
||||
* @var Tabs
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Tabs $tabs;
|
||||
|
||||
/**
|
||||
* The Fields Class.
|
||||
*
|
||||
* @var Fields
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Fields $fields;
|
||||
|
||||
/**
|
||||
* The Historyadminview Class.
|
||||
*
|
||||
* @var History
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected History $history;
|
||||
|
||||
/**
|
||||
* The Permissions Class.
|
||||
*
|
||||
* @var Permissions
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Permissions $permissions;
|
||||
|
||||
/**
|
||||
* The Conditions Class.
|
||||
*
|
||||
* @var Conditions
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Conditions $conditions;
|
||||
|
||||
/**
|
||||
* The Relations Class.
|
||||
*
|
||||
* @var Relations
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Relations $relations;
|
||||
|
||||
/**
|
||||
* The Linkedviews Class.
|
||||
*
|
||||
* @var Linkedviews
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Linkedviews $linkedviews;
|
||||
|
||||
/**
|
||||
* The Javascriptadminview Class.
|
||||
*
|
||||
* @var Javascript
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Javascript $javascript;
|
||||
|
||||
/**
|
||||
* The Cssadminview Class.
|
||||
*
|
||||
* @var Css
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Css $css;
|
||||
|
||||
/**
|
||||
* The Phpadminview Class.
|
||||
*
|
||||
* @var Php
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Php $php;
|
||||
|
||||
/**
|
||||
* The Custombuttons Class.
|
||||
*
|
||||
* @var Custombuttons
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Custombuttons $custombuttons;
|
||||
|
||||
/**
|
||||
* The Customimportscripts Class.
|
||||
*
|
||||
* @var Customimportscripts
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Customimportscripts $customimportscripts;
|
||||
|
||||
/**
|
||||
* The Ajaxadmin Class.
|
||||
*
|
||||
* @var Ajax
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Ajax $ajax;
|
||||
|
||||
/**
|
||||
* The Customalias Class.
|
||||
*
|
||||
* @var Customalias
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Customalias $customalias;
|
||||
|
||||
/**
|
||||
* The Sql Class.
|
||||
*
|
||||
* @var Sql
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Sql $sql;
|
||||
|
||||
/**
|
||||
* The Mysqlsettings Class.
|
||||
*
|
||||
* @var Mysqlsettings
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Mysqlsettings $mysqlsettings;
|
||||
|
||||
/**
|
||||
* The SiteEditView Class.
|
||||
*
|
||||
* @var SiteEditView
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected SiteEditView $siteeditview;
|
||||
|
||||
/**
|
||||
* Database object to query local DB
|
||||
*
|
||||
* @since 3.2.0
|
||||
**/
|
||||
protected $db;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param Config $config The Config Class.
|
||||
* @param Event $event The EventInterface Class.
|
||||
* @param Placeholder $placeholder The Placeholder Class.
|
||||
* @param Dispenser $dispenser The Dispenser Class.
|
||||
* @param Customtabs $customtabs The Customtabs Class.
|
||||
* @param Tabs $tabs The Tabs Class.
|
||||
* @param Fields $fields The Fields Class.
|
||||
* @param History $history The Historyadminview Class.
|
||||
* @param Permissions $permissions The Permissions Class.
|
||||
* @param Conditions $conditions The Conditions Class.
|
||||
* @param Relations $relations The Relations Class.
|
||||
* @param Linkedviews $linkedviews The Linkedviews Class.
|
||||
* @param Javascript $javascript The Javascriptadminview Class.
|
||||
* @param Css $css The Cssadminview Class.
|
||||
* @param Php $php The Phpadminview Class.
|
||||
* @param Custombuttons $custombuttons The Custombuttons Class.
|
||||
* @param Customimportscripts $customimportscripts The Customimportscripts Class.
|
||||
* @param Ajax $ajax The Ajaxadmin Class.
|
||||
* @param Customalias $customalias The Customalias Class.
|
||||
* @param Sql $sql The Sql Class.
|
||||
* @param Mysqlsettings $mysqlsettings The Mysqlsettings Class.
|
||||
* @param SiteEditView $siteeditview The SiteEditView Class.
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function __construct(Config $config, Event $event, Placeholder $placeholder, Dispenser $dispenser, Customtabs $customtabs, Tabs $tabs, Fields $fields,
|
||||
History $history, Permissions $permissions, Conditions $conditions, Relations $relations, Linkedviews $linkedviews, Javascript $javascript,
|
||||
Css $css, Php $php, Custombuttons $custombuttons, Customimportscripts $customimportscripts, Ajax $ajax, Customalias $customalias, Sql $sql,
|
||||
Mysqlsettings $mysqlsettings, SiteEditView $siteeditview)
|
||||
{
|
||||
$this->config = $config;
|
||||
$this->event = $event;
|
||||
$this->placeholder = $placeholder;
|
||||
$this->dispenser = $dispenser;
|
||||
$this->customtabs = $customtabs;
|
||||
$this->tabs = $tabs;
|
||||
$this->fields = $fields;
|
||||
$this->history = $history;
|
||||
$this->permissions = $permissions;
|
||||
$this->conditions = $conditions;
|
||||
$this->relations = $relations;
|
||||
$this->linkedviews = $linkedviews;
|
||||
$this->javascript = $javascript;
|
||||
$this->css = $css;
|
||||
$this->php = $php;
|
||||
$this->custombuttons = $custombuttons;
|
||||
$this->customimportscripts = $customimportscripts;
|
||||
$this->ajax = $ajax;
|
||||
$this->customalias = $customalias;
|
||||
$this->sql = $sql;
|
||||
$this->mysqlsettings = $mysqlsettings;
|
||||
$this->siteeditview = $siteeditview;
|
||||
$this->db = Factory::getDbo();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Admin View Data
|
||||
*
|
||||
* @param int $id The view ID
|
||||
*
|
||||
* @return object|null The view data
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function get(int $id): ?object
|
||||
{
|
||||
if (!isset($this->data[$id]))
|
||||
{
|
||||
// Create a new query object.
|
||||
$query = $this->db->getQuery(true);
|
||||
|
||||
$query->select('a.*');
|
||||
$query->select(
|
||||
$this->db->quoteName(
|
||||
array(
|
||||
'b.addfields',
|
||||
'b.id',
|
||||
'c.addconditions',
|
||||
'c.id',
|
||||
'r.addrelations',
|
||||
't.tabs'
|
||||
), array(
|
||||
'addfields',
|
||||
'addfields_id',
|
||||
'addconditions',
|
||||
'addconditions_id',
|
||||
'addrelations',
|
||||
'customtabs'
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
$query->from('#__componentbuilder_admin_view AS a');
|
||||
$query->join(
|
||||
'LEFT',
|
||||
$this->db->quoteName('#__componentbuilder_admin_fields', 'b')
|
||||
. ' ON (' . $this->db->quoteName('a.id') . ' = '
|
||||
. $this->db->quoteName('b.admin_view') . ')'
|
||||
);
|
||||
|
||||
$query->join(
|
||||
'LEFT', $this->db->quoteName(
|
||||
'#__componentbuilder_admin_fields_conditions', 'c'
|
||||
) . ' ON (' . $this->db->quoteName('a.id') . ' = '
|
||||
. $this->db->quoteName('c.admin_view') . ')'
|
||||
);
|
||||
|
||||
$query->join(
|
||||
'LEFT', $this->db->quoteName(
|
||||
'#__componentbuilder_admin_fields_relations', 'r'
|
||||
) . ' ON (' . $this->db->quoteName('a.id') . ' = '
|
||||
. $this->db->quoteName('r.admin_view') . ')'
|
||||
);
|
||||
|
||||
$query->join(
|
||||
'LEFT', $this->db->quoteName(
|
||||
'#__componentbuilder_admin_custom_tabs', 't'
|
||||
) . ' ON (' . $this->db->quoteName('a.id') . ' = '
|
||||
. $this->db->quoteName('t.admin_view') . ')'
|
||||
);
|
||||
|
||||
$query->where($this->db->quoteName('a.id') . ' = ' . (int) $id);
|
||||
|
||||
// Trigger Event: jcb_ce_onBeforeQueryViewData
|
||||
$this->event->trigger(
|
||||
'jcb_ce_onBeforeQueryViewData', [&$id, &$query, &$this->db]
|
||||
);
|
||||
|
||||
// Reset the query using our newly populated query object.
|
||||
$this->db->setQuery($query);
|
||||
|
||||
// Load the results as a list of stdClass objects (see later for more options on retrieving data).
|
||||
$view = $this->db->loadObject();
|
||||
|
||||
// setup single view code names to use in storing the data
|
||||
$view->name_single_code = 'oops_hmm_' . $id;
|
||||
if (isset($view->name_single) && $view->name_single != 'null')
|
||||
{
|
||||
$view->name_single_code = StringHelper::safe(
|
||||
$view->name_single
|
||||
);
|
||||
}
|
||||
|
||||
// setup list view code name to use in storing the data
|
||||
$view->name_list_code = 'oops_hmmm_' . $id;
|
||||
if (isset($view->name_list) && $view->name_list != 'null')
|
||||
{
|
||||
$view->name_list_code = StringHelper::safe(
|
||||
$view->name_list
|
||||
);
|
||||
}
|
||||
|
||||
// check the length of the view name (+5 for com_ and _)
|
||||
$name_length = $this->config->component_code_name_length + strlen(
|
||||
(string) $view->name_single_code
|
||||
) + 5;
|
||||
// when the name is larger than 49 we need to add the assets' table name fix
|
||||
if ($name_length > 49)
|
||||
{
|
||||
$this->config->set('add_assets_table_name_fix', true);
|
||||
}
|
||||
|
||||
// setup token check
|
||||
if (!isset($this->dispenser->hub['token']))
|
||||
{
|
||||
$this->dispenser->hub['token'] = [];
|
||||
}
|
||||
$this->dispenser->hub['token'][$view->name_single_code] = false;
|
||||
$this->dispenser->hub['token'][$view->name_list_code] = false;
|
||||
|
||||
// set some placeholders
|
||||
$this->placeholder->set('view', $view->name_single_code);
|
||||
$this->placeholder->set('views', $view->name_list_code);
|
||||
$this->placeholder->set('View', StringHelper::safe(
|
||||
$view->name_single, 'F'
|
||||
));
|
||||
$this->placeholder->set('Views', StringHelper::safe(
|
||||
$view->name_list, 'F'
|
||||
));
|
||||
$this->placeholder->set('VIEW', StringHelper::safe(
|
||||
$view->name_single, 'U'
|
||||
));
|
||||
$this->placeholder->set('VIEWS', StringHelper::safe(
|
||||
$view->name_list, 'U'
|
||||
));
|
||||
|
||||
// Trigger Event: jcb_ce_onBeforeModelViewData
|
||||
$this->event->trigger(
|
||||
'jcb_ce_onBeforeModelViewData', [&$view]
|
||||
);
|
||||
|
||||
// add the tables
|
||||
$view->addtables = (isset($view->addtables)
|
||||
&& JsonHelper::check($view->addtables))
|
||||
? json_decode((string) $view->addtables, true) : null;
|
||||
if (ArrayHelper::check($view->addtables))
|
||||
{
|
||||
$view->tables = array_values($view->addtables);
|
||||
}
|
||||
unset($view->addtables);
|
||||
|
||||
// set custom tabs
|
||||
$this->customtabs->set($view);
|
||||
|
||||
// set the local tabs
|
||||
$this->tabs->set($view);
|
||||
|
||||
// set permissions
|
||||
$this->permissions->set($view);
|
||||
|
||||
// set fields
|
||||
$this->fields->set($view);
|
||||
|
||||
// build update SQL
|
||||
$this->history->set($view);
|
||||
|
||||
// set the conditions
|
||||
$this->conditions->set($view);
|
||||
|
||||
// set the relations
|
||||
$this->relations->set($view);
|
||||
|
||||
// set linked views
|
||||
$this->linkedviews->set($view);
|
||||
|
||||
// set the lang target
|
||||
$this->config->lang_target = 'admin';
|
||||
if ($this->siteeditview->exists($id))
|
||||
{
|
||||
$this->config->lang_target = 'both';
|
||||
}
|
||||
|
||||
// set javascript
|
||||
$this->javascript->set($view);
|
||||
|
||||
// set css
|
||||
$this->css->set($view);
|
||||
|
||||
// set php
|
||||
$this->php->set($view);
|
||||
|
||||
// set custom buttons
|
||||
$this->custombuttons->set($view);
|
||||
|
||||
// set custom import scripts
|
||||
$this->customimportscripts->set($view);
|
||||
|
||||
// set Ajax for this view
|
||||
$this->ajax->set($view);
|
||||
|
||||
// activate alias builder
|
||||
$this->customalias->set($view);
|
||||
|
||||
// set sql
|
||||
$this->sql->set($view);
|
||||
|
||||
// set mySql Table Settings
|
||||
$this->mysqlsettings->set($view);
|
||||
|
||||
// Trigger Event: jcb_ce_onAfterModelViewData
|
||||
$this->event->trigger(
|
||||
'jcb_ce_onAfterModelViewData', [&$view]
|
||||
);
|
||||
|
||||
// clear placeholders
|
||||
$this->placeholder->remove('view');
|
||||
$this->placeholder->remove('views');
|
||||
$this->placeholder->remove('View');
|
||||
$this->placeholder->remove('Views');
|
||||
$this->placeholder->remove('VIEW');
|
||||
$this->placeholder->remove('VIEWS');
|
||||
|
||||
// store this view to class object
|
||||
$this->data[$id] = $view;
|
||||
}
|
||||
|
||||
// return the found view data
|
||||
return $this->data[$id];
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,123 @@
|
||||
<?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\Adminview;
|
||||
|
||||
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Builder\HasPermissions;
|
||||
use VDM\Joomla\Utilities\ArrayHelper;
|
||||
|
||||
|
||||
/**
|
||||
* Admin View Permission Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class Permission
|
||||
{
|
||||
/**
|
||||
* The HasPermissions Class.
|
||||
*
|
||||
* @var HasPermissions
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected HasPermissions $haspermissions;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param HasPermissions $haspermissions The HasPermissions Class.
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function __construct(HasPermissions $haspermissions)
|
||||
{
|
||||
$this->haspermissions = $haspermissions;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check to see if a view has permissions
|
||||
*
|
||||
* @param array $view View details
|
||||
* @param string $nameSingleCode View Single Code Name
|
||||
*
|
||||
* @return bool true if it has permissions
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function check(array &$view, string &$nameSingleCode): bool
|
||||
{
|
||||
// first check if we have checked this already
|
||||
if (!$this->haspermissions->exists($nameSingleCode))
|
||||
{
|
||||
// when a view has history, it has permissions
|
||||
// since it tracks the version access
|
||||
if (isset($view['history']) && $view['history'] == 1)
|
||||
{
|
||||
// set the permission for later
|
||||
$this->haspermissions->set($nameSingleCode, true);
|
||||
|
||||
// break out here
|
||||
return true;
|
||||
}
|
||||
// check if the view has permissions
|
||||
if (isset($view['settings'])
|
||||
&& ArrayHelper::check(
|
||||
$view['settings']->permissions, true
|
||||
))
|
||||
{
|
||||
foreach ($view['settings']->permissions as $per)
|
||||
{
|
||||
// check if the permission targets the view
|
||||
// 1 = view
|
||||
// 3 = both view & component
|
||||
if (isset($per['implementation'])
|
||||
&& (
|
||||
$per['implementation'] == 1
|
||||
|| $per['implementation'] == 3
|
||||
))
|
||||
{
|
||||
// set the permission for later
|
||||
$this->haspermissions->set($nameSingleCode, true);
|
||||
|
||||
// break out here
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
// check if the fields has permissions
|
||||
if (isset($view['settings'])
|
||||
&& ArrayHelper::check(
|
||||
$view['settings']->fields, true
|
||||
))
|
||||
{
|
||||
foreach ($view['settings']->fields as $field)
|
||||
{
|
||||
// if a field has any permissions
|
||||
// the a view has permissions
|
||||
if (isset($field['permission'])
|
||||
&& ArrayHelper::check(
|
||||
$field['permission'], true
|
||||
))
|
||||
{
|
||||
// set the permission for later
|
||||
$this->haspermissions->set($nameSingleCode, true);
|
||||
|
||||
// break out here
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $this->haspermissions->exists($nameSingleCode);
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
@@ -0,0 +1,263 @@
|
||||
<?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\Alias;
|
||||
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
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\Customcode;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Customcode\Gui;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Model\Loader;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Model\Libraries;
|
||||
use VDM\Joomla\Utilities\ArrayHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper;
|
||||
|
||||
|
||||
/**
|
||||
* Alias Data Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
class Data
|
||||
{
|
||||
/**
|
||||
* Compiler Config
|
||||
*
|
||||
* @var Config
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Config $config;
|
||||
|
||||
/**
|
||||
* The compiler registry
|
||||
*
|
||||
* @var Registry
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Registry $registry;
|
||||
|
||||
/**
|
||||
* Compiler Customcode
|
||||
*
|
||||
* @var Customcode
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Customcode $customcode;
|
||||
|
||||
/**
|
||||
* Compiler Customcode in Gui
|
||||
*
|
||||
* @var Gui
|
||||
* @since 3.2.0
|
||||
**/
|
||||
protected Gui $gui;
|
||||
|
||||
/**
|
||||
* Compiler Auto Loader
|
||||
*
|
||||
* @var Loader
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Loader $loader;
|
||||
|
||||
/**
|
||||
* Compiler Libraries Model
|
||||
*
|
||||
* @var Libraries
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Libraries $libraries;
|
||||
|
||||
/**
|
||||
* Database object to query local DB
|
||||
*
|
||||
* @since 3.2.0
|
||||
**/
|
||||
protected $db;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param Config|null $config The compiler config object.
|
||||
* @param Registry|null $registry The compiler registry object.
|
||||
* @param Customcode|null $customcode The compiler customcode object.
|
||||
* @param Gui|null $gui The compiler customcode gui.
|
||||
* @param Loader|null $load The compiler loader object.
|
||||
* @param Libraries|null $libraries The compiler libraries model object.
|
||||
* @param \JDatabaseDriver|null $db The database object.
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function __construct(?Config $config = null, ?Registry $registry = null,
|
||||
?Customcode $customcode = null, ?Gui $gui = null,
|
||||
?Loader $loader = null, ?Libraries $libraries = null)
|
||||
{
|
||||
$this->config = $config ?: Compiler::_('Config');
|
||||
$this->registry = $registry ?: Compiler::_('Registry');
|
||||
$this->customcode = $customcode ?: Compiler::_('Customcode');
|
||||
$this->gui = $gui ?: Compiler::_('Customcode.Gui');
|
||||
$this->loader = $loader ?: Compiler::_('Model.Loader');
|
||||
$this->libraries = $libraries ?: Compiler::_('Model.Libraries');
|
||||
$this->db = Factory::getDbo();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Data by Alias
|
||||
*
|
||||
* @param string $alias The alias name
|
||||
* @param string $table The table where to find the alias
|
||||
* @param string $view The view code name
|
||||
*
|
||||
* @return array|null The data found with the alias
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function get(string $alias, string $table, string $view): ?array
|
||||
{
|
||||
// if not set, get all keys in table and set by ID
|
||||
$this->set($table);
|
||||
|
||||
// now check if key is found
|
||||
$name = preg_replace("/[^A-Za-z]/", '', $alias);
|
||||
|
||||
if (($id = $this->registry->get('builder.data_with_alias_keys.' . $table . '.' . $name, null)) === null &&
|
||||
($id = $this->registry->get('builder.data_with_alias_keys.' . $table . '.' . $alias, null)) === null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
// Create a new query object.
|
||||
$query = $this->db->getQuery(true);
|
||||
$query->select('a.*');
|
||||
$query->from('#__componentbuilder_' . $table . ' AS a');
|
||||
$query->where(
|
||||
$this->db->quoteName('a.id') . ' = ' . (int) $id
|
||||
);
|
||||
|
||||
// get the row
|
||||
$this->db->setQuery($query);
|
||||
$item = $this->db->loadObject();
|
||||
|
||||
// get the other target if both
|
||||
$targets = [$this->config->build_target];
|
||||
|
||||
if ($this->config->lang_target === 'both')
|
||||
{
|
||||
$targets = ['site', 'admin'];
|
||||
}
|
||||
|
||||
// we load this layout
|
||||
$php_view = '';
|
||||
if ($item->add_php_view == 1
|
||||
&& StringHelper::check($item->php_view))
|
||||
{
|
||||
$php_view = $this->gui->set(
|
||||
$this->customcode->update(base64_decode((string) $item->php_view)),
|
||||
array(
|
||||
'table' => $table,
|
||||
'field' => 'php_view',
|
||||
'id' => (int) $item->id,
|
||||
'type' => 'php')
|
||||
);
|
||||
}
|
||||
|
||||
$content = $this->gui->set(
|
||||
$this->customcode->update(base64_decode((string) $item->{$table})),
|
||||
array(
|
||||
'table' => $table,
|
||||
'field' => $table,
|
||||
'id' => (int) $item->id,
|
||||
'type' => 'html')
|
||||
);
|
||||
|
||||
// load all targets
|
||||
foreach ($targets as $target)
|
||||
{
|
||||
// set libraries
|
||||
$this->libraries->set($view, $item, $target);
|
||||
|
||||
// auto loaders
|
||||
$this->loader->set($view, $content, $target);
|
||||
$this->loader->set($view, $php_view, $target);
|
||||
}
|
||||
|
||||
// load uikit version 2 if required
|
||||
$this->loader->uikit($view, $content);
|
||||
$this->loader->uikit($view, $php_view);
|
||||
|
||||
return [
|
||||
'id' => $item->id,
|
||||
'html' => $this->gui->set(
|
||||
$content,
|
||||
[
|
||||
'table' => $table,
|
||||
'field' => $table,
|
||||
'id' => $item->id,
|
||||
'type' => 'html'
|
||||
]
|
||||
),
|
||||
'php_view' => $this->gui->set(
|
||||
$php_view,
|
||||
[
|
||||
'table' => $table,
|
||||
'field' => 'php_view',
|
||||
'id' => $item->id,
|
||||
'type' => 'php'
|
||||
]
|
||||
)
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Load all alias and ID's of a table
|
||||
*
|
||||
* @param string $table The table where to find the alias
|
||||
*
|
||||
* @return void
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected function set(string $table)
|
||||
{
|
||||
// now check if key is found
|
||||
if (!$this->registry->get('builder.data_with_alias_keys.' . $table, null))
|
||||
{
|
||||
// Create a new query object.
|
||||
$query = $this->db->getQuery(true);
|
||||
$query->select(array('a.id', 'a.alias'));
|
||||
$query->from('#__componentbuilder_' . $table . ' AS a');
|
||||
$this->db->setQuery($query);
|
||||
$items = $this->db->loadObjectList();
|
||||
|
||||
// check if we have an array
|
||||
if (ArrayHelper::check($items))
|
||||
{
|
||||
foreach ($items as $item)
|
||||
{
|
||||
// build the key
|
||||
$k_ey = StringHelper::safe($item->alias);
|
||||
$key = preg_replace("/[^A-Za-z]/", '', (string) $k_ey);
|
||||
|
||||
// set the keys
|
||||
$this->registry->
|
||||
set('builder.data_with_alias_keys.' . $table . '.' . $item->alias, $item->id);
|
||||
$this->registry->
|
||||
set('builder.data_with_alias_keys.' . $table . '.' . $k_ey, $item->id);
|
||||
$this->registry->
|
||||
set('builder.data_with_alias_keys.' . $table . '.' . $key, $item->id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
@@ -0,0 +1,129 @@
|
||||
<?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\Architecture\JoomlaFive\Controller;
|
||||
|
||||
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Config;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Creator\Permission;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Customcode\Dispenser;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Architecture\Controller\AllowAddInterface;
|
||||
|
||||
|
||||
/**
|
||||
* Controller Allow Add Class for Joomla 5
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class AllowAdd implements AllowAddInterface
|
||||
{
|
||||
/**
|
||||
* The Component code name.
|
||||
*
|
||||
* @var String
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected String $component;
|
||||
|
||||
/**
|
||||
* The Permission Class.
|
||||
*
|
||||
* @var Permission
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Permission $permission;
|
||||
|
||||
/**
|
||||
* The Dispenser Class.
|
||||
*
|
||||
* @var Dispenser
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Dispenser $dispenser;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param Config $config The Config Class.
|
||||
* @param Permission $permission The Permission Class.
|
||||
* @param Dispenser $dispenser The Dispenser Class.
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function __construct(Config $config, Permission $permission,
|
||||
Dispenser $dispenser)
|
||||
{
|
||||
$this->component = $config->component_code_name;
|
||||
$this->permission = $permission;
|
||||
$this->dispenser = $dispenser;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Allow Add Function Code
|
||||
*
|
||||
* @param string $nameSingleCode The single code name of the view.
|
||||
*
|
||||
* @since 3.2.0
|
||||
* @return string The allow add method code
|
||||
*/
|
||||
public function get(string $nameSingleCode): string
|
||||
{
|
||||
$allow = [];
|
||||
|
||||
// prepare custom permission script
|
||||
$custom_allow = $this->dispenser->get(
|
||||
'php_allowadd', $nameSingleCode, '', null, true
|
||||
);
|
||||
|
||||
$allow[] = PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " Get user object.";
|
||||
$allow[] = Indent::_(2) . "\$user = \$this->app->getIdentity();";
|
||||
// check if the item has permissions.
|
||||
if ($this->permission->globalExist($nameSingleCode, 'core.access'))
|
||||
{
|
||||
$allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " Access check.";
|
||||
$allow[] = Indent::_(2) . "\$access = \$user->authorise('"
|
||||
. $this->permission->getGlobal($nameSingleCode, 'core.access')
|
||||
. "', 'com_" . $this->component . "');";
|
||||
$allow[] = Indent::_(2) . "if (!\$access)";
|
||||
$allow[] = Indent::_(2) . "{";
|
||||
$allow[] = Indent::_(3) . "return false;";
|
||||
$allow[] = Indent::_(2) . "}";
|
||||
}
|
||||
|
||||
// load custom permission script
|
||||
$allow[] = $custom_allow;
|
||||
|
||||
// check if the item has permissions.
|
||||
if ($this->permission->globalExist($nameSingleCode, 'core.create'))
|
||||
{
|
||||
// setup the default script
|
||||
$allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " In the absence of better information, revert to the component permissions.";
|
||||
$allow[] = Indent::_(2) . "return \$user->authorise('"
|
||||
. $this->permission->getGlobal($nameSingleCode, 'core.create')
|
||||
. "', \$this->option);";
|
||||
}
|
||||
else
|
||||
{
|
||||
// setup the default script
|
||||
$allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " In the absence of better information, revert to the component permissions.";
|
||||
$allow[] = Indent::_(2) . "return parent::allowAdd(\$data);";
|
||||
}
|
||||
|
||||
return implode(PHP_EOL, $allow);
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,300 @@
|
||||
<?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\Architecture\JoomlaFive\Controller;
|
||||
|
||||
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Config;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Creator\Permission;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Customcode\Dispenser;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Builder\Category;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Builder\CategoryOtherName;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Architecture\Controller\AllowEditInterface;
|
||||
|
||||
|
||||
/**
|
||||
* Controller Allow Edit Class for Joomla 5
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class AllowEdit implements AllowEditInterface
|
||||
{
|
||||
/**
|
||||
* The Component code name.
|
||||
*
|
||||
* @var String
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected String $component;
|
||||
|
||||
/**
|
||||
* The Permission Class.
|
||||
*
|
||||
* @var Permission
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Permission $permission;
|
||||
|
||||
/**
|
||||
* The Dispenser Class.
|
||||
*
|
||||
* @var Dispenser
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Dispenser $dispenser;
|
||||
|
||||
/**
|
||||
* The Category Class.
|
||||
*
|
||||
* @var Category
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Category $category;
|
||||
|
||||
/**
|
||||
* The CategoryOtherName Class.
|
||||
*
|
||||
* @var CategoryOtherName
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected CategoryOtherName $categoryothername;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param Config $config The Config Class.
|
||||
* @param Permission $permission The Permission Class.
|
||||
* @param Dispenser $dispenser The Dispenser Class.
|
||||
* @param Category $category The Category Class.
|
||||
* @param CategoryOtherName $categoryothername The CategoryOtherName Class.
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function __construct(Config $config, Permission $permission,
|
||||
Dispenser $dispenser, Category $category,
|
||||
CategoryOtherName $categoryothername)
|
||||
{
|
||||
$this->component = $config->component_code_name;
|
||||
$this->permission = $permission;
|
||||
$this->dispenser = $dispenser;
|
||||
$this->category = $category;
|
||||
$this->categoryothername = $categoryothername;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Allow Edit Function Code
|
||||
*
|
||||
* @param string $nameSingleCode The single code name of the view.
|
||||
* @param string $nameListCode The list code name of the view.
|
||||
*
|
||||
* @since 3.2.0
|
||||
* @return string The allow edit method code
|
||||
*/
|
||||
public function get(string $nameSingleCode, string $nameListCode): string
|
||||
{
|
||||
$allow = [];
|
||||
|
||||
// prepare custom permission script
|
||||
$customAllow = $this->dispenser->get(
|
||||
'php_allowedit', $nameSingleCode, '', null, true
|
||||
);
|
||||
|
||||
if ($this->category->exists("{$nameListCode}"))
|
||||
{
|
||||
// check if category has another name
|
||||
$otherViews = $this->categoryothername->
|
||||
get($nameListCode . '.views', $nameListCode);
|
||||
$otherView = $this->categoryothername->
|
||||
get($nameListCode . '.view', $nameSingleCode);
|
||||
// setup the category script
|
||||
$allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " get user object.";
|
||||
$allow[] = Indent::_(2) . "\$user = \$this->app->getIdentity();";
|
||||
$allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " get record id.";
|
||||
$allow[] = Indent::_(2)
|
||||
. "\$recordId = (int) isset(\$data[\$key]) ? \$data[\$key] : 0;";
|
||||
// load custom permission script
|
||||
$allow[] = $customAllow;
|
||||
// check if the item has permissions.
|
||||
if ($this->permission->globalExist($otherView, 'core.access'))
|
||||
{
|
||||
$allow[] = PHP_EOL . Indent::_(2) . "//" . Line::_(
|
||||
__LINE__,__CLASS__
|
||||
) . " Access check.";
|
||||
$allow[] = Indent::_(2) . "\$access = (\$user->authorise('"
|
||||
. $this->permission->getGlobal($otherView, 'core.access')
|
||||
. "', 'com_" . $this->component . "." . $otherView
|
||||
. ".' . (int) \$recordId) && \$user->authorise('"
|
||||
. $this->permission->getGlobal($otherView, 'core.access')
|
||||
. "', 'com_" . $this->component . "'));";
|
||||
$allow[] = Indent::_(2) . "if (!\$access)";
|
||||
$allow[] = Indent::_(2) . "{";
|
||||
$allow[] = Indent::_(3) . "return false;";
|
||||
$allow[] = Indent::_(2) . "}";
|
||||
}
|
||||
$allow[] = PHP_EOL . Indent::_(2) . "if (\$recordId)";
|
||||
$allow[] = Indent::_(2) . "{";
|
||||
$allow[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
|
||||
. " The record has been set. Check the record permissions.";
|
||||
// check if the item has permissions.
|
||||
$allow[] = Indent::_(3) . "\$permission = \$user->authorise('"
|
||||
. $this->permission->getAction($otherView, 'core.edit') . "', 'com_" . $this->component . "."
|
||||
. $otherView . ".' . (int) \$recordId);";
|
||||
$allow[] = Indent::_(3) . "if (!\$permission)";
|
||||
$allow[] = Indent::_(3) . "{";
|
||||
// check if the item has permissions.
|
||||
$allow[] = Indent::_(4) . "if (\$user->authorise('"
|
||||
. $this->permission->getAction($otherView, 'core.edit.own') . "', 'com_" . $this->component . "."
|
||||
. $otherView . ".' . \$recordId))";
|
||||
$allow[] = Indent::_(4) . "{";
|
||||
$allow[] = Indent::_(5) . "//" . Line::_(__Line__, __Class__)
|
||||
. " Fallback on edit.own. Now test the owner is the user.";
|
||||
$allow[] = Indent::_(5)
|
||||
. "\$ownerId = (int) isset(\$data['created_by']) ? \$data['created_by'] : 0;";
|
||||
$allow[] = Indent::_(5) . "if (empty(\$ownerId))";
|
||||
$allow[] = Indent::_(5) . "{";
|
||||
$allow[] = Indent::_(6) . "//" . Line::_(__Line__, __Class__)
|
||||
. " Need to do a lookup from the model.";
|
||||
$allow[] = Indent::_(6)
|
||||
. "\$record = \$this->getModel()->getItem(\$recordId);";
|
||||
$allow[] = PHP_EOL . Indent::_(6) . "if (empty(\$record))";
|
||||
$allow[] = Indent::_(6) . "{";
|
||||
$allow[] = Indent::_(7) . "return false;";
|
||||
$allow[] = Indent::_(6) . "}";
|
||||
$allow[] = Indent::_(6) . "\$ownerId = \$record->created_by;";
|
||||
$allow[] = Indent::_(5) . "}";
|
||||
$allow[] = PHP_EOL . Indent::_(5) . "//" . Line::_(__Line__, __Class__)
|
||||
. " If the owner matches 'me' then do the test.";
|
||||
$allow[] = Indent::_(5) . "if (\$ownerId == \$user->id)";
|
||||
$allow[] = Indent::_(5) . "{";
|
||||
// check if the item has permissions.
|
||||
$allow[] = Indent::_(6) . "if (\$user->authorise('"
|
||||
. $this->permission->getGlobal($otherView, 'core.edit.own') . "', 'com_" . $this->component . "'))";
|
||||
$allow[] = Indent::_(6) . "{";
|
||||
$allow[] = Indent::_(7) . "return true;";
|
||||
$allow[] = Indent::_(6) . "}";
|
||||
$allow[] = Indent::_(5) . "}";
|
||||
$allow[] = Indent::_(4) . "}";
|
||||
$allow[] = Indent::_(4) . "return false;";
|
||||
$allow[] = Indent::_(3) . "}";
|
||||
$allow[] = Indent::_(2) . "}";
|
||||
if ($this->permission->globalExist($otherView, 'core.edit'))
|
||||
{
|
||||
$allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " Since there is no permission, revert to the component permissions.";
|
||||
$allow[] = Indent::_(2) . "return \$user->authorise('"
|
||||
. $this->permission->getGlobal($otherView, 'core.edit') . "', \$this->option);";
|
||||
}
|
||||
else
|
||||
{
|
||||
$allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " Since there is no permission, revert to the component permissions.";
|
||||
$allow[] = Indent::_(2)
|
||||
. "return parent::allowEdit(\$data, \$key);";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// setup the category script
|
||||
$allow[] = PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " get user object.";
|
||||
$allow[] = Indent::_(2) . "\$user = \$this->app->getIdentity();";
|
||||
$allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " get record id.";
|
||||
$allow[] = Indent::_(2)
|
||||
. "\$recordId = (int) isset(\$data[\$key]) ? \$data[\$key] : 0;";
|
||||
// load custom permission script
|
||||
$allow[] = $customAllow;
|
||||
// check if the item has permissions.
|
||||
if ($this->permission->actionExist($nameSingleCode, 'core.access'))
|
||||
{
|
||||
$allow[] = PHP_EOL . Indent::_(2) . "//" . Line::_(
|
||||
__LINE__,__CLASS__
|
||||
) . " Access check.";
|
||||
$allow[] = Indent::_(2) . "\$access = (\$user->authorise('"
|
||||
. $this->permission->getAction($nameSingleCode, 'core.access') . "', 'com_" . $this->component . "."
|
||||
. $nameSingleCode
|
||||
. ".' . (int) \$recordId) && \$user->authorise('"
|
||||
. $this->permission->getAction($nameSingleCode, 'core.access') . "', 'com_" . $this->component . "'));";
|
||||
$allow[] = Indent::_(2) . "if (!\$access)";
|
||||
$allow[] = Indent::_(2) . "{";
|
||||
$allow[] = Indent::_(3) . "return false;";
|
||||
$allow[] = Indent::_(2) . "}";
|
||||
}
|
||||
$allow[] = PHP_EOL . Indent::_(2) . "if (\$recordId)";
|
||||
$allow[] = Indent::_(2) . "{";
|
||||
$allow[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
|
||||
. " The record has been set. Check the record permissions.";
|
||||
// check if the item has permissions.
|
||||
$allow[] = Indent::_(3) . "\$permission = \$user->authorise('"
|
||||
. $this->permission->getAction($nameSingleCode, 'core.edit') . "', 'com_" . $this->component . "."
|
||||
. $nameSingleCode . ".' . (int) \$recordId);";
|
||||
$allow[] = Indent::_(3) . "if (!\$permission)";
|
||||
$allow[] = Indent::_(3) . "{";
|
||||
// check if the item has permissions.
|
||||
$allow[] = Indent::_(4) . "if (\$user->authorise('"
|
||||
. $this->permission->getAction($nameSingleCode, 'core.edit.own') . "', 'com_" . $this->component . "."
|
||||
. $nameSingleCode . ".' . \$recordId))";
|
||||
$allow[] = Indent::_(4) . "{";
|
||||
$allow[] = Indent::_(5) . "//" . Line::_(__Line__, __Class__)
|
||||
. " Now test the owner is the user.";
|
||||
$allow[] = Indent::_(5)
|
||||
. "\$ownerId = (int) isset(\$data['created_by']) ? \$data['created_by'] : 0;";
|
||||
$allow[] = Indent::_(5) . "if (empty(\$ownerId))";
|
||||
$allow[] = Indent::_(5) . "{";
|
||||
$allow[] = Indent::_(6) . "//" . Line::_(__Line__, __Class__)
|
||||
. " Need to do a lookup from the model.";
|
||||
$allow[] = Indent::_(6)
|
||||
. "\$record = \$this->getModel()->getItem(\$recordId);";
|
||||
$allow[] = PHP_EOL . Indent::_(6) . "if (empty(\$record))";
|
||||
$allow[] = Indent::_(6) . "{";
|
||||
$allow[] = Indent::_(7) . "return false;";
|
||||
$allow[] = Indent::_(6) . "}";
|
||||
$allow[] = Indent::_(6) . "\$ownerId = \$record->created_by;";
|
||||
$allow[] = Indent::_(5) . "}";
|
||||
$allow[] = PHP_EOL . Indent::_(5) . "//" . Line::_(__Line__, __Class__)
|
||||
. " If the owner matches 'me' then allow.";
|
||||
$allow[] = Indent::_(5) . "if (\$ownerId == \$user->id)";
|
||||
$allow[] = Indent::_(5) . "{";
|
||||
// check if the item has permissions.
|
||||
$allow[] = Indent::_(6) . "if (\$user->authorise('"
|
||||
. $this->permission->getGlobal($nameSingleCode, 'core.edit.own') . "', 'com_" . $this->component . "'))";
|
||||
$allow[] = Indent::_(6) . "{";
|
||||
$allow[] = Indent::_(7) . "return true;";
|
||||
$allow[] = Indent::_(6) . "}";
|
||||
$allow[] = Indent::_(5) . "}";
|
||||
$allow[] = Indent::_(4) . "}";
|
||||
$allow[] = Indent::_(4) . "return false;";
|
||||
$allow[] = Indent::_(3) . "}";
|
||||
$allow[] = Indent::_(2) . "}";
|
||||
if ($this->permission->globalExist($nameSingleCode, 'core.edit'))
|
||||
{
|
||||
$allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " Since there is no permission, revert to the component permissions.";
|
||||
$allow[] = Indent::_(2) . "return \$user->authorise('"
|
||||
. $this->permission->getGlobal($nameSingleCode, 'core.edit') . "', \$this->option);";
|
||||
}
|
||||
else
|
||||
{
|
||||
$allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " Since there is no permission, revert to the component permissions.";
|
||||
$allow[] = Indent::_(2)
|
||||
. "return parent::allowEdit(\$data, \$key);";
|
||||
}
|
||||
}
|
||||
|
||||
return implode(PHP_EOL, $allow);
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
@@ -0,0 +1,87 @@
|
||||
<?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\Architecture\JoomlaFive\Model;
|
||||
|
||||
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Config;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Creator\Permission;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Architecture\Model\CanDeleteInterface;
|
||||
|
||||
|
||||
/**
|
||||
* Model Can Delete Class for Joomla 5
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class CanDelete implements CanDeleteInterface
|
||||
{
|
||||
/**
|
||||
* The Component code name.
|
||||
*
|
||||
* @var String
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected String $component;
|
||||
|
||||
/**
|
||||
* The Permission Class.
|
||||
*
|
||||
* @var Permission
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Permission $permission;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param Config $config The Config Class.
|
||||
* @param Permission $permission The Permission Class.
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function __construct(Config $config, Permission $permission)
|
||||
{
|
||||
$this->component = $config->component_code_name;
|
||||
$this->permission = $permission;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Can Delete Function Code
|
||||
*
|
||||
* @param string $nameSingleCode The single code name of the view.
|
||||
*
|
||||
* @since 3.2.0
|
||||
* @return string The can delete method code
|
||||
*/
|
||||
public function get(string $nameSingleCode): string
|
||||
{
|
||||
$allow = [];
|
||||
|
||||
// setup the default script
|
||||
$allow[] = PHP_EOL . Indent::_(2) . "if (empty(\$record->id) || (\$record->published != -2))";
|
||||
$allow[] = Indent::_(2) . "{";
|
||||
$allow[] = Indent::_(3) . "return false;";
|
||||
$allow[] = Indent::_(2) . "}" . PHP_EOL;
|
||||
|
||||
// check if the item has permissions.
|
||||
$allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " The record has been set. Check the record permissions.";
|
||||
$allow[] = Indent::_(2) . "return \$this->getCurrentUser()->authorise('"
|
||||
. $this->permission->getAction($nameSingleCode, 'core.delete') . "', 'com_" . $this->component . "."
|
||||
. $nameSingleCode . ".' . (int) \$record->id);";
|
||||
|
||||
return implode(PHP_EOL, $allow);
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,108 @@
|
||||
<?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\Architecture\JoomlaFive\Model;
|
||||
|
||||
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Config;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Creator\Permission;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Architecture\Model\CanEditStateInterface;
|
||||
|
||||
|
||||
/**
|
||||
* Model Can Edit State Class for Joomla 5
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class CanEditState implements CanEditStateInterface
|
||||
{
|
||||
/**
|
||||
* The Component code name.
|
||||
*
|
||||
* @var String
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected String $component;
|
||||
|
||||
/**
|
||||
* The Permission Class.
|
||||
*
|
||||
* @var Permission
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Permission $permission;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param Config $config The Config Class.
|
||||
* @param Permission $permission The Permission Class.
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function __construct(Config $config, Permission $permission)
|
||||
{
|
||||
$this->component = $config->component_code_name;
|
||||
$this->permission = $permission;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Can Edit State Function Code
|
||||
*
|
||||
* @param string $nameSingleCode The single code name of the view.
|
||||
*
|
||||
* @since 3.2.0
|
||||
* @return string The can edit state method code
|
||||
*/
|
||||
public function get(string $nameSingleCode): string
|
||||
{
|
||||
$allow = [];
|
||||
|
||||
// setup the default script
|
||||
$allow[] = PHP_EOL . Indent::_(2) . "\$user = \$this->getCurrentUser();";
|
||||
$allow[] = Indent::_(2)
|
||||
. "\$recordId = \$record->id ?? 0;";
|
||||
$allow[] = PHP_EOL . Indent::_(2) . "if (\$recordId)";
|
||||
$allow[] = Indent::_(2) . "{";
|
||||
$allow[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
|
||||
. " The record has been set. Check the record permissions.";
|
||||
// check if the item has permissions.
|
||||
$allow[] = Indent::_(3) . "\$permission = \$user->authorise('"
|
||||
. $this->permission->getAction($nameSingleCode, 'core.edit.state')
|
||||
. "', 'com_" . $this->component . "." . $nameSingleCode . ".' . (int) \$recordId);";
|
||||
$allow[] = Indent::_(3)
|
||||
. "if (!\$permission && !is_null(\$permission))";
|
||||
$allow[] = Indent::_(3) . "{";
|
||||
$allow[] = Indent::_(4) . "return false;";
|
||||
$allow[] = Indent::_(3) . "}";
|
||||
$allow[] = Indent::_(2) . "}";
|
||||
if ($this->permission->globalExist($nameSingleCode, 'core.edit.state'))
|
||||
{
|
||||
$allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " In the absence of better information, revert to the component permissions.";
|
||||
$allow[] = Indent::_(2) . "return \$user->authorise('"
|
||||
. $this->permission->getGlobal($nameSingleCode, 'core.edit.state') . "', 'com_" . $this->component
|
||||
. "');";
|
||||
}
|
||||
else
|
||||
{
|
||||
$allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " In the absence of better information, revert to the component permissions.";
|
||||
$allow[] = Indent::_(2)
|
||||
. "return parent::canEditState(\$record);";
|
||||
}
|
||||
|
||||
return implode(PHP_EOL, $allow);
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
@@ -0,0 +1,129 @@
|
||||
<?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\Architecture\JoomlaFour\Controller;
|
||||
|
||||
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Config;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Creator\Permission;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Customcode\Dispenser;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Architecture\Controller\AllowAddInterface;
|
||||
|
||||
|
||||
/**
|
||||
* Controller Allow Add Class for Joomla 4
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class AllowAdd implements AllowAddInterface
|
||||
{
|
||||
/**
|
||||
* The Component code name.
|
||||
*
|
||||
* @var String
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected String $component;
|
||||
|
||||
/**
|
||||
* The Permission Class.
|
||||
*
|
||||
* @var Permission
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Permission $permission;
|
||||
|
||||
/**
|
||||
* The Dispenser Class.
|
||||
*
|
||||
* @var Dispenser
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Dispenser $dispenser;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param Config $config The Config Class.
|
||||
* @param Permission $permission The Permission Class.
|
||||
* @param Dispenser $dispenser The Dispenser Class.
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function __construct(Config $config, Permission $permission,
|
||||
Dispenser $dispenser)
|
||||
{
|
||||
$this->component = $config->component_code_name;
|
||||
$this->permission = $permission;
|
||||
$this->dispenser = $dispenser;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Allow Add Function Code
|
||||
*
|
||||
* @param string $nameSingleCode The single code name of the view.
|
||||
*
|
||||
* @since 3.2.0
|
||||
* @return string The allow add method code
|
||||
*/
|
||||
public function get(string $nameSingleCode): string
|
||||
{
|
||||
$allow = [];
|
||||
|
||||
// prepare custom permission script
|
||||
$custom_allow = $this->dispenser->get(
|
||||
'php_allowadd', $nameSingleCode, '', null, true
|
||||
);
|
||||
|
||||
$allow[] = PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " Get user object.";
|
||||
$allow[] = Indent::_(2) . "\$user = \$this->app->getIdentity();";
|
||||
// check if the item has permissions.
|
||||
if ($this->permission->globalExist($nameSingleCode, 'core.access'))
|
||||
{
|
||||
$allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " Access check.";
|
||||
$allow[] = Indent::_(2) . "\$access = \$user->authorise('"
|
||||
. $this->permission->getGlobal($nameSingleCode, 'core.access')
|
||||
. "', 'com_" . $this->component . "');";
|
||||
$allow[] = Indent::_(2) . "if (!\$access)";
|
||||
$allow[] = Indent::_(2) . "{";
|
||||
$allow[] = Indent::_(3) . "return false;";
|
||||
$allow[] = Indent::_(2) . "}";
|
||||
}
|
||||
|
||||
// load custom permission script
|
||||
$allow[] = $custom_allow;
|
||||
|
||||
// check if the item has permissions.
|
||||
if ($this->permission->globalExist($nameSingleCode, 'core.create'))
|
||||
{
|
||||
// setup the default script
|
||||
$allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " In the absence of better information, revert to the component permissions.";
|
||||
$allow[] = Indent::_(2) . "return \$user->authorise('"
|
||||
. $this->permission->getGlobal($nameSingleCode, 'core.create')
|
||||
. "', \$this->option);";
|
||||
}
|
||||
else
|
||||
{
|
||||
// setup the default script
|
||||
$allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " In the absence of better information, revert to the component permissions.";
|
||||
$allow[] = Indent::_(2) . "return parent::allowAdd(\$data);";
|
||||
}
|
||||
|
||||
return implode(PHP_EOL, $allow);
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,300 @@
|
||||
<?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\Architecture\JoomlaFour\Controller;
|
||||
|
||||
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Config;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Creator\Permission;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Customcode\Dispenser;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Builder\Category;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Builder\CategoryOtherName;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Architecture\Controller\AllowEditInterface;
|
||||
|
||||
|
||||
/**
|
||||
* Controller Allow Edit Class for Joomla 4
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class AllowEdit implements AllowEditInterface
|
||||
{
|
||||
/**
|
||||
* The Component code name.
|
||||
*
|
||||
* @var String
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected String $component;
|
||||
|
||||
/**
|
||||
* The Permission Class.
|
||||
*
|
||||
* @var Permission
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Permission $permission;
|
||||
|
||||
/**
|
||||
* The Dispenser Class.
|
||||
*
|
||||
* @var Dispenser
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Dispenser $dispenser;
|
||||
|
||||
/**
|
||||
* The Category Class.
|
||||
*
|
||||
* @var Category
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Category $category;
|
||||
|
||||
/**
|
||||
* The CategoryOtherName Class.
|
||||
*
|
||||
* @var CategoryOtherName
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected CategoryOtherName $categoryothername;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param Config $config The Config Class.
|
||||
* @param Permission $permission The Permission Class.
|
||||
* @param Dispenser $dispenser The Dispenser Class.
|
||||
* @param Category $category The Category Class.
|
||||
* @param CategoryOtherName $categoryothername The CategoryOtherName Class.
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function __construct(Config $config, Permission $permission,
|
||||
Dispenser $dispenser, Category $category,
|
||||
CategoryOtherName $categoryothername)
|
||||
{
|
||||
$this->component = $config->component_code_name;
|
||||
$this->permission = $permission;
|
||||
$this->dispenser = $dispenser;
|
||||
$this->category = $category;
|
||||
$this->categoryothername = $categoryothername;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Allow Edit Function Code
|
||||
*
|
||||
* @param string $nameSingleCode The single code name of the view.
|
||||
* @param string $nameListCode The list code name of the view.
|
||||
*
|
||||
* @since 3.2.0
|
||||
* @return string The allow edit method code
|
||||
*/
|
||||
public function get(string $nameSingleCode, string $nameListCode): string
|
||||
{
|
||||
$allow = [];
|
||||
|
||||
// prepare custom permission script
|
||||
$customAllow = $this->dispenser->get(
|
||||
'php_allowedit', $nameSingleCode, '', null, true
|
||||
);
|
||||
|
||||
if ($this->category->exists("{$nameListCode}"))
|
||||
{
|
||||
// check if category has another name
|
||||
$otherViews = $this->categoryothername->
|
||||
get($nameListCode . '.views', $nameListCode);
|
||||
$otherView = $this->categoryothername->
|
||||
get($nameListCode . '.view', $nameSingleCode);
|
||||
// setup the category script
|
||||
$allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " get user object.";
|
||||
$allow[] = Indent::_(2) . "\$user = \$this->app->getIdentity();";
|
||||
$allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " get record id.";
|
||||
$allow[] = Indent::_(2)
|
||||
. "\$recordId = (int) isset(\$data[\$key]) ? \$data[\$key] : 0;";
|
||||
// load custom permission script
|
||||
$allow[] = $customAllow;
|
||||
// check if the item has permissions.
|
||||
if ($this->permission->globalExist($otherView, 'core.access'))
|
||||
{
|
||||
$allow[] = PHP_EOL . Indent::_(2) . "//" . Line::_(
|
||||
__LINE__,__CLASS__
|
||||
) . " Access check.";
|
||||
$allow[] = Indent::_(2) . "\$access = (\$user->authorise('"
|
||||
. $this->permission->getGlobal($otherView, 'core.access')
|
||||
. "', 'com_" . $this->component . "." . $otherView
|
||||
. ".' . (int) \$recordId) && \$user->authorise('"
|
||||
. $this->permission->getGlobal($otherView, 'core.access')
|
||||
. "', 'com_" . $this->component . "'));";
|
||||
$allow[] = Indent::_(2) . "if (!\$access)";
|
||||
$allow[] = Indent::_(2) . "{";
|
||||
$allow[] = Indent::_(3) . "return false;";
|
||||
$allow[] = Indent::_(2) . "}";
|
||||
}
|
||||
$allow[] = PHP_EOL . Indent::_(2) . "if (\$recordId)";
|
||||
$allow[] = Indent::_(2) . "{";
|
||||
$allow[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
|
||||
. " The record has been set. Check the record permissions.";
|
||||
// check if the item has permissions.
|
||||
$allow[] = Indent::_(3) . "\$permission = \$user->authorise('"
|
||||
. $this->permission->getAction($otherView, 'core.edit') . "', 'com_" . $this->component . "."
|
||||
. $otherView . ".' . (int) \$recordId);";
|
||||
$allow[] = Indent::_(3) . "if (!\$permission)";
|
||||
$allow[] = Indent::_(3) . "{";
|
||||
// check if the item has permissions.
|
||||
$allow[] = Indent::_(4) . "if (\$user->authorise('"
|
||||
. $this->permission->getAction($otherView, 'core.edit.own') . "', 'com_" . $this->component . "."
|
||||
. $otherView . ".' . \$recordId))";
|
||||
$allow[] = Indent::_(4) . "{";
|
||||
$allow[] = Indent::_(5) . "//" . Line::_(__Line__, __Class__)
|
||||
. " Fallback on edit.own. Now test the owner is the user.";
|
||||
$allow[] = Indent::_(5)
|
||||
. "\$ownerId = (int) isset(\$data['created_by']) ? \$data['created_by'] : 0;";
|
||||
$allow[] = Indent::_(5) . "if (empty(\$ownerId))";
|
||||
$allow[] = Indent::_(5) . "{";
|
||||
$allow[] = Indent::_(6) . "//" . Line::_(__Line__, __Class__)
|
||||
. " Need to do a lookup from the model.";
|
||||
$allow[] = Indent::_(6)
|
||||
. "\$record = \$this->getModel()->getItem(\$recordId);";
|
||||
$allow[] = PHP_EOL . Indent::_(6) . "if (empty(\$record))";
|
||||
$allow[] = Indent::_(6) . "{";
|
||||
$allow[] = Indent::_(7) . "return false;";
|
||||
$allow[] = Indent::_(6) . "}";
|
||||
$allow[] = Indent::_(6) . "\$ownerId = \$record->created_by;";
|
||||
$allow[] = Indent::_(5) . "}";
|
||||
$allow[] = PHP_EOL . Indent::_(5) . "//" . Line::_(__Line__, __Class__)
|
||||
. " If the owner matches 'me' then do the test.";
|
||||
$allow[] = Indent::_(5) . "if (\$ownerId == \$user->id)";
|
||||
$allow[] = Indent::_(5) . "{";
|
||||
// check if the item has permissions.
|
||||
$allow[] = Indent::_(6) . "if (\$user->authorise('"
|
||||
. $this->permission->getGlobal($otherView, 'core.edit.own') . "', 'com_" . $this->component . "'))";
|
||||
$allow[] = Indent::_(6) . "{";
|
||||
$allow[] = Indent::_(7) . "return true;";
|
||||
$allow[] = Indent::_(6) . "}";
|
||||
$allow[] = Indent::_(5) . "}";
|
||||
$allow[] = Indent::_(4) . "}";
|
||||
$allow[] = Indent::_(4) . "return false;";
|
||||
$allow[] = Indent::_(3) . "}";
|
||||
$allow[] = Indent::_(2) . "}";
|
||||
if ($this->permission->globalExist($otherView, 'core.edit'))
|
||||
{
|
||||
$allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " Since there is no permission, revert to the component permissions.";
|
||||
$allow[] = Indent::_(2) . "return \$user->authorise('"
|
||||
. $this->permission->getGlobal($otherView, 'core.edit') . "', \$this->option);";
|
||||
}
|
||||
else
|
||||
{
|
||||
$allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " Since there is no permission, revert to the component permissions.";
|
||||
$allow[] = Indent::_(2)
|
||||
. "return parent::allowEdit(\$data, \$key);";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// setup the category script
|
||||
$allow[] = PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " get user object.";
|
||||
$allow[] = Indent::_(2) . "\$user = \$this->app->getIdentity();";
|
||||
$allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " get record id.";
|
||||
$allow[] = Indent::_(2)
|
||||
. "\$recordId = (int) isset(\$data[\$key]) ? \$data[\$key] : 0;";
|
||||
// load custom permission script
|
||||
$allow[] = $customAllow;
|
||||
// check if the item has permissions.
|
||||
if ($this->permission->actionExist($nameSingleCode, 'core.access'))
|
||||
{
|
||||
$allow[] = PHP_EOL . Indent::_(2) . "//" . Line::_(
|
||||
__LINE__,__CLASS__
|
||||
) . " Access check.";
|
||||
$allow[] = Indent::_(2) . "\$access = (\$user->authorise('"
|
||||
. $this->permission->getAction($nameSingleCode, 'core.access') . "', 'com_" . $this->component . "."
|
||||
. $nameSingleCode
|
||||
. ".' . (int) \$recordId) && \$user->authorise('"
|
||||
. $this->permission->getAction($nameSingleCode, 'core.access') . "', 'com_" . $this->component . "'));";
|
||||
$allow[] = Indent::_(2) . "if (!\$access)";
|
||||
$allow[] = Indent::_(2) . "{";
|
||||
$allow[] = Indent::_(3) . "return false;";
|
||||
$allow[] = Indent::_(2) . "}";
|
||||
}
|
||||
$allow[] = PHP_EOL . Indent::_(2) . "if (\$recordId)";
|
||||
$allow[] = Indent::_(2) . "{";
|
||||
$allow[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
|
||||
. " The record has been set. Check the record permissions.";
|
||||
// check if the item has permissions.
|
||||
$allow[] = Indent::_(3) . "\$permission = \$user->authorise('"
|
||||
. $this->permission->getAction($nameSingleCode, 'core.edit') . "', 'com_" . $this->component . "."
|
||||
. $nameSingleCode . ".' . (int) \$recordId);";
|
||||
$allow[] = Indent::_(3) . "if (!\$permission)";
|
||||
$allow[] = Indent::_(3) . "{";
|
||||
// check if the item has permissions.
|
||||
$allow[] = Indent::_(4) . "if (\$user->authorise('"
|
||||
. $this->permission->getAction($nameSingleCode, 'core.edit.own') . "', 'com_" . $this->component . "."
|
||||
. $nameSingleCode . ".' . \$recordId))";
|
||||
$allow[] = Indent::_(4) . "{";
|
||||
$allow[] = Indent::_(5) . "//" . Line::_(__Line__, __Class__)
|
||||
. " Now test the owner is the user.";
|
||||
$allow[] = Indent::_(5)
|
||||
. "\$ownerId = (int) isset(\$data['created_by']) ? \$data['created_by'] : 0;";
|
||||
$allow[] = Indent::_(5) . "if (empty(\$ownerId))";
|
||||
$allow[] = Indent::_(5) . "{";
|
||||
$allow[] = Indent::_(6) . "//" . Line::_(__Line__, __Class__)
|
||||
. " Need to do a lookup from the model.";
|
||||
$allow[] = Indent::_(6)
|
||||
. "\$record = \$this->getModel()->getItem(\$recordId);";
|
||||
$allow[] = PHP_EOL . Indent::_(6) . "if (empty(\$record))";
|
||||
$allow[] = Indent::_(6) . "{";
|
||||
$allow[] = Indent::_(7) . "return false;";
|
||||
$allow[] = Indent::_(6) . "}";
|
||||
$allow[] = Indent::_(6) . "\$ownerId = \$record->created_by;";
|
||||
$allow[] = Indent::_(5) . "}";
|
||||
$allow[] = PHP_EOL . Indent::_(5) . "//" . Line::_(__Line__, __Class__)
|
||||
. " If the owner matches 'me' then allow.";
|
||||
$allow[] = Indent::_(5) . "if (\$ownerId == \$user->id)";
|
||||
$allow[] = Indent::_(5) . "{";
|
||||
// check if the item has permissions.
|
||||
$allow[] = Indent::_(6) . "if (\$user->authorise('"
|
||||
. $this->permission->getGlobal($nameSingleCode, 'core.edit.own') . "', 'com_" . $this->component . "'))";
|
||||
$allow[] = Indent::_(6) . "{";
|
||||
$allow[] = Indent::_(7) . "return true;";
|
||||
$allow[] = Indent::_(6) . "}";
|
||||
$allow[] = Indent::_(5) . "}";
|
||||
$allow[] = Indent::_(4) . "}";
|
||||
$allow[] = Indent::_(4) . "return false;";
|
||||
$allow[] = Indent::_(3) . "}";
|
||||
$allow[] = Indent::_(2) . "}";
|
||||
if ($this->permission->globalExist($nameSingleCode, 'core.edit'))
|
||||
{
|
||||
$allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " Since there is no permission, revert to the component permissions.";
|
||||
$allow[] = Indent::_(2) . "return \$user->authorise('"
|
||||
. $this->permission->getGlobal($nameSingleCode, 'core.edit') . "', \$this->option);";
|
||||
}
|
||||
else
|
||||
{
|
||||
$allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " Since there is no permission, revert to the component permissions.";
|
||||
$allow[] = Indent::_(2)
|
||||
. "return parent::allowEdit(\$data, \$key);";
|
||||
}
|
||||
}
|
||||
|
||||
return implode(PHP_EOL, $allow);
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
@@ -0,0 +1,87 @@
|
||||
<?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\Architecture\JoomlaFour\Model;
|
||||
|
||||
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Config;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Creator\Permission;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Architecture\Model\CanDeleteInterface;
|
||||
|
||||
|
||||
/**
|
||||
* Model Can Delete Class for Joomla 4
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class CanDelete implements CanDeleteInterface
|
||||
{
|
||||
/**
|
||||
* The Component code name.
|
||||
*
|
||||
* @var String
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected String $component;
|
||||
|
||||
/**
|
||||
* The Permission Class.
|
||||
*
|
||||
* @var Permission
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Permission $permission;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param Config $config The Config Class.
|
||||
* @param Permission $permission The Permission Class.
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function __construct(Config $config, Permission $permission)
|
||||
{
|
||||
$this->component = $config->component_code_name;
|
||||
$this->permission = $permission;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Can Delete Function Code
|
||||
*
|
||||
* @param string $nameSingleCode The single code name of the view.
|
||||
*
|
||||
* @since 3.2.0
|
||||
* @return string The can delete method code
|
||||
*/
|
||||
public function get(string $nameSingleCode): string
|
||||
{
|
||||
$allow = [];
|
||||
|
||||
// setup the default script
|
||||
$allow[] = PHP_EOL . Indent::_(2) . "if (empty(\$record->id) || (\$record->published != -2))";
|
||||
$allow[] = Indent::_(2) . "{";
|
||||
$allow[] = Indent::_(3) . "return false;";
|
||||
$allow[] = Indent::_(2) . "}" . PHP_EOL;
|
||||
|
||||
// check if the item has permissions.
|
||||
$allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " The record has been set. Check the record permissions.";
|
||||
$allow[] = Indent::_(2) . "return \$this->getCurrentUser()->authorise('"
|
||||
. $this->permission->getAction($nameSingleCode, 'core.delete') . "', 'com_" . $this->component . "."
|
||||
. $nameSingleCode . ".' . (int) \$record->id);";
|
||||
|
||||
return implode(PHP_EOL, $allow);
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,108 @@
|
||||
<?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\Architecture\JoomlaFour\Model;
|
||||
|
||||
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Config;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Creator\Permission;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Architecture\Model\CanEditStateInterface;
|
||||
|
||||
|
||||
/**
|
||||
* Model Can Edit State Class for Joomla 4
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class CanEditState implements CanEditStateInterface
|
||||
{
|
||||
/**
|
||||
* The Component code name.
|
||||
*
|
||||
* @var String
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected String $component;
|
||||
|
||||
/**
|
||||
* The Permission Class.
|
||||
*
|
||||
* @var Permission
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Permission $permission;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param Config $config The Config Class.
|
||||
* @param Permission $permission The Permission Class.
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function __construct(Config $config, Permission $permission)
|
||||
{
|
||||
$this->component = $config->component_code_name;
|
||||
$this->permission = $permission;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Can Edit State Function Code
|
||||
*
|
||||
* @param string $nameSingleCode The single code name of the view.
|
||||
*
|
||||
* @since 3.2.0
|
||||
* @return string The can edit state method code
|
||||
*/
|
||||
public function get(string $nameSingleCode): string
|
||||
{
|
||||
$allow = [];
|
||||
|
||||
// setup the default script
|
||||
$allow[] = PHP_EOL . Indent::_(2) . "\$user = \$this->getCurrentUser();";
|
||||
$allow[] = Indent::_(2)
|
||||
. "\$recordId = \$record->id ?? 0;";
|
||||
$allow[] = PHP_EOL . Indent::_(2) . "if (\$recordId)";
|
||||
$allow[] = Indent::_(2) . "{";
|
||||
$allow[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
|
||||
. " The record has been set. Check the record permissions.";
|
||||
// check if the item has permissions.
|
||||
$allow[] = Indent::_(3) . "\$permission = \$user->authorise('"
|
||||
. $this->permission->getAction($nameSingleCode, 'core.edit.state')
|
||||
. "', 'com_" . $this->component . "." . $nameSingleCode . ".' . (int) \$recordId);";
|
||||
$allow[] = Indent::_(3)
|
||||
. "if (!\$permission && !is_null(\$permission))";
|
||||
$allow[] = Indent::_(3) . "{";
|
||||
$allow[] = Indent::_(4) . "return false;";
|
||||
$allow[] = Indent::_(3) . "}";
|
||||
$allow[] = Indent::_(2) . "}";
|
||||
if ($this->permission->globalExist($nameSingleCode, 'core.edit.state'))
|
||||
{
|
||||
$allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " In the absence of better information, revert to the component permissions.";
|
||||
$allow[] = Indent::_(2) . "return \$user->authorise('"
|
||||
. $this->permission->getGlobal($nameSingleCode, 'core.edit.state') . "', 'com_" . $this->component
|
||||
. "');";
|
||||
}
|
||||
else
|
||||
{
|
||||
$allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " In the absence of better information, revert to the component permissions.";
|
||||
$allow[] = Indent::_(2)
|
||||
. "return parent::canEditState(\$record);";
|
||||
}
|
||||
|
||||
return implode(PHP_EOL, $allow);
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
@@ -0,0 +1,129 @@
|
||||
<?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\Architecture\JoomlaThree\Controller;
|
||||
|
||||
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Config;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Creator\Permission;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Customcode\Dispenser;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Architecture\Controller\AllowAddInterface;
|
||||
|
||||
|
||||
/**
|
||||
* Controller Allow Add Class for Joomla 3
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class AllowAdd implements AllowAddInterface
|
||||
{
|
||||
/**
|
||||
* The Component code name.
|
||||
*
|
||||
* @var String
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected String $component;
|
||||
|
||||
/**
|
||||
* The Permission Class.
|
||||
*
|
||||
* @var Permission
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Permission $permission;
|
||||
|
||||
/**
|
||||
* The Dispenser Class.
|
||||
*
|
||||
* @var Dispenser
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Dispenser $dispenser;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param Config $config The Config Class.
|
||||
* @param Permission $permission The Permission Class.
|
||||
* @param Dispenser $dispenser The Dispenser Class.
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function __construct(Config $config, Permission $permission,
|
||||
Dispenser $dispenser)
|
||||
{
|
||||
$this->component = $config->component_code_name;
|
||||
$this->permission = $permission;
|
||||
$this->dispenser = $dispenser;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Allow Add Function Code
|
||||
*
|
||||
* @param string $nameSingleCode The single code name of the view.
|
||||
*
|
||||
* @since 3.2.0
|
||||
* @return string The allow add method code
|
||||
*/
|
||||
public function get(string $nameSingleCode): string
|
||||
{
|
||||
$allow = [];
|
||||
|
||||
// prepare custom permission script
|
||||
$custom_allow = $this->dispenser->get(
|
||||
'php_allowadd', $nameSingleCode, '', null, true
|
||||
);
|
||||
|
||||
$allow[] = PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " Get user object.";
|
||||
$allow[] = Indent::_(2) . "\$user = Factory::getUser();";
|
||||
// check if the item has permissions.
|
||||
if ($this->permission->globalExist($nameSingleCode, 'core.access'))
|
||||
{
|
||||
$allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " Access check.";
|
||||
$allow[] = Indent::_(2) . "\$access = \$user->authorise('"
|
||||
. $this->permission->getGlobal($nameSingleCode, 'core.access')
|
||||
. "', 'com_" . $this->component . "');";
|
||||
$allow[] = Indent::_(2) . "if (!\$access)";
|
||||
$allow[] = Indent::_(2) . "{";
|
||||
$allow[] = Indent::_(3) . "return false;";
|
||||
$allow[] = Indent::_(2) . "}";
|
||||
}
|
||||
|
||||
// load custom permission script
|
||||
$allow[] = $custom_allow;
|
||||
|
||||
// check if the item has permissions.
|
||||
if ($this->permission->globalExist($nameSingleCode, 'core.create'))
|
||||
{
|
||||
// setup the default script
|
||||
$allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " In the absence of better information, revert to the component permissions.";
|
||||
$allow[] = Indent::_(2) . "return \$user->authorise('"
|
||||
. $this->permission->getGlobal($nameSingleCode, 'core.create')
|
||||
. "', \$this->option);";
|
||||
}
|
||||
else
|
||||
{
|
||||
// setup the default script
|
||||
$allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " In the absence of better information, revert to the component permissions.";
|
||||
$allow[] = Indent::_(2) . "return parent::allowAdd(\$data);";
|
||||
}
|
||||
|
||||
return implode(PHP_EOL, $allow);
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,300 @@
|
||||
<?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\Architecture\JoomlaThree\Controller;
|
||||
|
||||
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Config;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Creator\Permission;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Customcode\Dispenser;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Builder\Category;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Builder\CategoryOtherName;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Architecture\Controller\AllowEditInterface;
|
||||
|
||||
|
||||
/**
|
||||
* Controller Allow Edit Class for Joomla 3
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class AllowEdit implements AllowEditInterface
|
||||
{
|
||||
/**
|
||||
* The Component code name.
|
||||
*
|
||||
* @var String
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected String $component;
|
||||
|
||||
/**
|
||||
* The Permission Class.
|
||||
*
|
||||
* @var Permission
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Permission $permission;
|
||||
|
||||
/**
|
||||
* The Dispenser Class.
|
||||
*
|
||||
* @var Dispenser
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Dispenser $dispenser;
|
||||
|
||||
/**
|
||||
* The Category Class.
|
||||
*
|
||||
* @var Category
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Category $category;
|
||||
|
||||
/**
|
||||
* The CategoryOtherName Class.
|
||||
*
|
||||
* @var CategoryOtherName
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected CategoryOtherName $categoryothername;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param Config $config The Config Class.
|
||||
* @param Permission $permission The Permission Class.
|
||||
* @param Dispenser $dispenser The Dispenser Class.
|
||||
* @param Category $category The Category Class.
|
||||
* @param CategoryOtherName $categoryothername The CategoryOtherName Class.
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function __construct(Config $config, Permission $permission,
|
||||
Dispenser $dispenser, Category $category,
|
||||
CategoryOtherName $categoryothername)
|
||||
{
|
||||
$this->component = $config->component_code_name;
|
||||
$this->permission = $permission;
|
||||
$this->dispenser = $dispenser;
|
||||
$this->category = $category;
|
||||
$this->categoryothername = $categoryothername;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Allow Edit Function Code
|
||||
*
|
||||
* @param string $nameSingleCode The single code name of the view.
|
||||
* @param string $nameListCode The list code name of the view.
|
||||
*
|
||||
* @since 3.2.0
|
||||
* @return string The allow edit method code
|
||||
*/
|
||||
public function get(string $nameSingleCode, string $nameListCode): string
|
||||
{
|
||||
$allow = [];
|
||||
|
||||
// prepare custom permission script
|
||||
$customAllow = $this->dispenser->get(
|
||||
'php_allowedit', $nameSingleCode, '', null, true
|
||||
);
|
||||
|
||||
if ($this->category->exists("{$nameListCode}"))
|
||||
{
|
||||
// check if category has another name
|
||||
$otherViews = $this->categoryothername->
|
||||
get($nameListCode . '.views', $nameListCode);
|
||||
$otherView = $this->categoryothername->
|
||||
get($nameListCode . '.view', $nameSingleCode);
|
||||
// setup the category script
|
||||
$allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " get user object.";
|
||||
$allow[] = Indent::_(2) . "\$user = Factory::getUser();";
|
||||
$allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " get record id.";
|
||||
$allow[] = Indent::_(2)
|
||||
. "\$recordId = (int) isset(\$data[\$key]) ? \$data[\$key] : 0;";
|
||||
// load custom permission script
|
||||
$allow[] = $customAllow;
|
||||
// check if the item has permissions.
|
||||
if ($this->permission->globalExist($otherView, 'core.access'))
|
||||
{
|
||||
$allow[] = PHP_EOL . Indent::_(2) . "//" . Line::_(
|
||||
__LINE__,__CLASS__
|
||||
) . " Access check.";
|
||||
$allow[] = Indent::_(2) . "\$access = (\$user->authorise('"
|
||||
. $this->permission->getGlobal($otherView, 'core.access')
|
||||
. "', 'com_" . $this->component . "." . $otherView
|
||||
. ".' . (int) \$recordId) && \$user->authorise('"
|
||||
. $this->permission->getGlobal($otherView, 'core.access')
|
||||
. "', 'com_" . $this->component . "'));";
|
||||
$allow[] = Indent::_(2) . "if (!\$access)";
|
||||
$allow[] = Indent::_(2) . "{";
|
||||
$allow[] = Indent::_(3) . "return false;";
|
||||
$allow[] = Indent::_(2) . "}";
|
||||
}
|
||||
$allow[] = PHP_EOL . Indent::_(2) . "if (\$recordId)";
|
||||
$allow[] = Indent::_(2) . "{";
|
||||
$allow[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
|
||||
. " The record has been set. Check the record permissions.";
|
||||
// check if the item has permissions.
|
||||
$allow[] = Indent::_(3) . "\$permission = \$user->authorise('"
|
||||
. $this->permission->getAction($otherView, 'core.edit') . "', 'com_" . $this->component . "."
|
||||
. $otherView . ".' . (int) \$recordId);";
|
||||
$allow[] = Indent::_(3) . "if (!\$permission)";
|
||||
$allow[] = Indent::_(3) . "{";
|
||||
// check if the item has permissions.
|
||||
$allow[] = Indent::_(4) . "if (\$user->authorise('"
|
||||
. $this->permission->getAction($otherView, 'core.edit.own') . "', 'com_" . $this->component . "."
|
||||
. $otherView . ".' . \$recordId))";
|
||||
$allow[] = Indent::_(4) . "{";
|
||||
$allow[] = Indent::_(5) . "//" . Line::_(__Line__, __Class__)
|
||||
. " Fallback on edit.own. Now test the owner is the user.";
|
||||
$allow[] = Indent::_(5)
|
||||
. "\$ownerId = (int) isset(\$data['created_by']) ? \$data['created_by'] : 0;";
|
||||
$allow[] = Indent::_(5) . "if (empty(\$ownerId))";
|
||||
$allow[] = Indent::_(5) . "{";
|
||||
$allow[] = Indent::_(6) . "//" . Line::_(__Line__, __Class__)
|
||||
. " Need to do a lookup from the model.";
|
||||
$allow[] = Indent::_(6)
|
||||
. "\$record = \$this->getModel()->getItem(\$recordId);";
|
||||
$allow[] = PHP_EOL . Indent::_(6) . "if (empty(\$record))";
|
||||
$allow[] = Indent::_(6) . "{";
|
||||
$allow[] = Indent::_(7) . "return false;";
|
||||
$allow[] = Indent::_(6) . "}";
|
||||
$allow[] = Indent::_(6) . "\$ownerId = \$record->created_by;";
|
||||
$allow[] = Indent::_(5) . "}";
|
||||
$allow[] = PHP_EOL . Indent::_(5) . "//" . Line::_(__Line__, __Class__)
|
||||
. " If the owner matches 'me' then do the test.";
|
||||
$allow[] = Indent::_(5) . "if (\$ownerId == \$user->id)";
|
||||
$allow[] = Indent::_(5) . "{";
|
||||
// check if the item has permissions.
|
||||
$allow[] = Indent::_(6) . "if (\$user->authorise('"
|
||||
. $this->permission->getGlobal($otherView, 'core.edit.own') . "', 'com_" . $this->component . "'))";
|
||||
$allow[] = Indent::_(6) . "{";
|
||||
$allow[] = Indent::_(7) . "return true;";
|
||||
$allow[] = Indent::_(6) . "}";
|
||||
$allow[] = Indent::_(5) . "}";
|
||||
$allow[] = Indent::_(4) . "}";
|
||||
$allow[] = Indent::_(4) . "return false;";
|
||||
$allow[] = Indent::_(3) . "}";
|
||||
$allow[] = Indent::_(2) . "}";
|
||||
if ($this->permission->globalExist($otherView, 'core.edit'))
|
||||
{
|
||||
$allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " Since there is no permission, revert to the component permissions.";
|
||||
$allow[] = Indent::_(2) . "return \$user->authorise('"
|
||||
. $this->permission->getGlobal($otherView, 'core.edit') . "', \$this->option);";
|
||||
}
|
||||
else
|
||||
{
|
||||
$allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " Since there is no permission, revert to the component permissions.";
|
||||
$allow[] = Indent::_(2)
|
||||
. "return parent::allowEdit(\$data, \$key);";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// setup the category script
|
||||
$allow[] = PHP_EOL . Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " get user object.";
|
||||
$allow[] = Indent::_(2) . "\$user = Factory::getUser();";
|
||||
$allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " get record id.";
|
||||
$allow[] = Indent::_(2)
|
||||
. "\$recordId = (int) isset(\$data[\$key]) ? \$data[\$key] : 0;";
|
||||
// load custom permission script
|
||||
$allow[] = $customAllow;
|
||||
// check if the item has permissions.
|
||||
if ($this->permission->actionExist($nameSingleCode, 'core.access'))
|
||||
{
|
||||
$allow[] = PHP_EOL . Indent::_(2) . "//" . Line::_(
|
||||
__LINE__,__CLASS__
|
||||
) . " Access check.";
|
||||
$allow[] = Indent::_(2) . "\$access = (\$user->authorise('"
|
||||
. $this->permission->getAction($nameSingleCode, 'core.access') . "', 'com_" . $this->component . "."
|
||||
. $nameSingleCode
|
||||
. ".' . (int) \$recordId) && \$user->authorise('"
|
||||
. $this->permission->getAction($nameSingleCode, 'core.access') . "', 'com_" . $this->component . "'));";
|
||||
$allow[] = Indent::_(2) . "if (!\$access)";
|
||||
$allow[] = Indent::_(2) . "{";
|
||||
$allow[] = Indent::_(3) . "return false;";
|
||||
$allow[] = Indent::_(2) . "}";
|
||||
}
|
||||
$allow[] = PHP_EOL . Indent::_(2) . "if (\$recordId)";
|
||||
$allow[] = Indent::_(2) . "{";
|
||||
$allow[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
|
||||
. " The record has been set. Check the record permissions.";
|
||||
// check if the item has permissions.
|
||||
$allow[] = Indent::_(3) . "\$permission = \$user->authorise('"
|
||||
. $this->permission->getAction($nameSingleCode, 'core.edit') . "', 'com_" . $this->component . "."
|
||||
. $nameSingleCode . ".' . (int) \$recordId);";
|
||||
$allow[] = Indent::_(3) . "if (!\$permission)";
|
||||
$allow[] = Indent::_(3) . "{";
|
||||
// check if the item has permissions.
|
||||
$allow[] = Indent::_(4) . "if (\$user->authorise('"
|
||||
. $this->permission->getAction($nameSingleCode, 'core.edit.own') . "', 'com_" . $this->component . "."
|
||||
. $nameSingleCode . ".' . \$recordId))";
|
||||
$allow[] = Indent::_(4) . "{";
|
||||
$allow[] = Indent::_(5) . "//" . Line::_(__Line__, __Class__)
|
||||
. " Now test the owner is the user.";
|
||||
$allow[] = Indent::_(5)
|
||||
. "\$ownerId = (int) isset(\$data['created_by']) ? \$data['created_by'] : 0;";
|
||||
$allow[] = Indent::_(5) . "if (empty(\$ownerId))";
|
||||
$allow[] = Indent::_(5) . "{";
|
||||
$allow[] = Indent::_(6) . "//" . Line::_(__Line__, __Class__)
|
||||
. " Need to do a lookup from the model.";
|
||||
$allow[] = Indent::_(6)
|
||||
. "\$record = \$this->getModel()->getItem(\$recordId);";
|
||||
$allow[] = PHP_EOL . Indent::_(6) . "if (empty(\$record))";
|
||||
$allow[] = Indent::_(6) . "{";
|
||||
$allow[] = Indent::_(7) . "return false;";
|
||||
$allow[] = Indent::_(6) . "}";
|
||||
$allow[] = Indent::_(6) . "\$ownerId = \$record->created_by;";
|
||||
$allow[] = Indent::_(5) . "}";
|
||||
$allow[] = PHP_EOL . Indent::_(5) . "//" . Line::_(__Line__, __Class__)
|
||||
. " If the owner matches 'me' then allow.";
|
||||
$allow[] = Indent::_(5) . "if (\$ownerId == \$user->id)";
|
||||
$allow[] = Indent::_(5) . "{";
|
||||
// check if the item has permissions.
|
||||
$allow[] = Indent::_(6) . "if (\$user->authorise('"
|
||||
. $this->permission->getGlobal($nameSingleCode, 'core.edit.own') . "', 'com_" . $this->component . "'))";
|
||||
$allow[] = Indent::_(6) . "{";
|
||||
$allow[] = Indent::_(7) . "return true;";
|
||||
$allow[] = Indent::_(6) . "}";
|
||||
$allow[] = Indent::_(5) . "}";
|
||||
$allow[] = Indent::_(4) . "}";
|
||||
$allow[] = Indent::_(4) . "return false;";
|
||||
$allow[] = Indent::_(3) . "}";
|
||||
$allow[] = Indent::_(2) . "}";
|
||||
if ($this->permission->globalExist($nameSingleCode, 'core.edit'))
|
||||
{
|
||||
$allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " Since there is no permission, revert to the component permissions.";
|
||||
$allow[] = Indent::_(2) . "return \$user->authorise('"
|
||||
. $this->permission->getGlobal($nameSingleCode, 'core.edit') . "', \$this->option);";
|
||||
}
|
||||
else
|
||||
{
|
||||
$allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " Since there is no permission, revert to the component permissions.";
|
||||
$allow[] = Indent::_(2)
|
||||
. "return parent::allowEdit(\$data, \$key);";
|
||||
}
|
||||
}
|
||||
|
||||
return implode(PHP_EOL, $allow);
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
@@ -0,0 +1,91 @@
|
||||
<?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\Architecture\JoomlaThree\Model;
|
||||
|
||||
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Config;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Creator\Permission;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Architecture\Model\CanDeleteInterface;
|
||||
|
||||
|
||||
/**
|
||||
* Model Can Delete Class for Joomla 3
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class CanDelete implements CanDeleteInterface
|
||||
{
|
||||
/**
|
||||
* The Component code name.
|
||||
*
|
||||
* @var String
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected String $component;
|
||||
|
||||
/**
|
||||
* The Permission Class.
|
||||
*
|
||||
* @var Permission
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Permission $permission;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param Config $config The Config Class.
|
||||
* @param Permission $permission The Permission Class.
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function __construct(Config $config, Permission $permission)
|
||||
{
|
||||
$this->component = $config->component_code_name;
|
||||
$this->permission = $permission;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Model Can Delete Function Code
|
||||
*
|
||||
* @param string $nameSingleCode The single code name of the view.
|
||||
*
|
||||
* @since 3.2.0
|
||||
* @return string The can delete method code
|
||||
*/
|
||||
public function get(string $nameSingleCode): string
|
||||
{
|
||||
$allow = [];
|
||||
// setup the default script
|
||||
$allow[] = PHP_EOL . Indent::_(2) . "if (!empty(\$record->id))";
|
||||
$allow[] = Indent::_(2) . "{";
|
||||
$allow[] = Indent::_(3) . "if (\$record->published != -2)";
|
||||
$allow[] = Indent::_(3) . "{";
|
||||
$allow[] = Indent::_(4) . "return;";
|
||||
$allow[] = Indent::_(3) . "}";
|
||||
// check if the item has permissions.
|
||||
$allow[] = PHP_EOL . Indent::_(3)
|
||||
. "\$user = Factory::getUser();";
|
||||
$allow[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
|
||||
. " The record has been set. Check the record permissions.";
|
||||
$allow[] = Indent::_(3) . "return \$user->authorise('"
|
||||
. $this->permission->getAction($nameSingleCode, 'core.delete') . "', 'com_" . $this->component . "."
|
||||
. $nameSingleCode . ".' . (int) \$record->id);";
|
||||
$allow[] = Indent::_(2) . "}";
|
||||
$allow[] = Indent::_(2) . "return false;";
|
||||
|
||||
return implode(PHP_EOL, $allow);
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,108 @@
|
||||
<?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\Architecture\JoomlaThree\Model;
|
||||
|
||||
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Config;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Creator\Permission;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Indent;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Utilities\Line;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Interfaces\Architecture\Model\CanEditStateInterface;
|
||||
|
||||
|
||||
/**
|
||||
* Model Can Edit State Class for Joomla 3
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class CanEditState implements CanEditStateInterface
|
||||
{
|
||||
/**
|
||||
* The Component code name.
|
||||
*
|
||||
* @var String
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected String $component;
|
||||
|
||||
/**
|
||||
* The Permission Class.
|
||||
*
|
||||
* @var Permission
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected Permission $permission;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param Config $config The Config Class.
|
||||
* @param Permission $permission The Permission Class.
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function __construct(Config $config, Permission $permission)
|
||||
{
|
||||
$this->component = $config->component_code_name;
|
||||
$this->permission = $permission;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Can Edit State Function Code
|
||||
*
|
||||
* @param string $nameSingleCode The single code name of the view.
|
||||
*
|
||||
* @since 3.2.0
|
||||
* @return string The can edit state method code
|
||||
*/
|
||||
public function get(string $nameSingleCode): string
|
||||
{
|
||||
$allow = [];
|
||||
|
||||
// setup the default script
|
||||
$allow[] = PHP_EOL . Indent::_(2) . "\$user = Factory::getUser();";
|
||||
$allow[] = Indent::_(2)
|
||||
. "\$recordId = \$record->id ?? 0;";
|
||||
$allow[] = PHP_EOL . Indent::_(2) . "if (\$recordId)";
|
||||
$allow[] = Indent::_(2) . "{";
|
||||
$allow[] = Indent::_(3) . "//" . Line::_(__Line__, __Class__)
|
||||
. " The record has been set. Check the record permissions.";
|
||||
// check if the item has permissions.
|
||||
$allow[] = Indent::_(3) . "\$permission = \$user->authorise('"
|
||||
. $this->permission->getAction($nameSingleCode, 'core.edit.state')
|
||||
. "', 'com_" . $this->component . "." . $nameSingleCode . ".' . (int) \$recordId);";
|
||||
$allow[] = Indent::_(3)
|
||||
. "if (!\$permission && !is_null(\$permission))";
|
||||
$allow[] = Indent::_(3) . "{";
|
||||
$allow[] = Indent::_(4) . "return false;";
|
||||
$allow[] = Indent::_(3) . "}";
|
||||
$allow[] = Indent::_(2) . "}";
|
||||
if ($this->permission->globalExist($nameSingleCode, 'core.edit.state'))
|
||||
{
|
||||
$allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " In the absence of better information, revert to the component permissions.";
|
||||
$allow[] = Indent::_(2) . "return \$user->authorise('"
|
||||
. $this->permission->getGlobal($nameSingleCode, 'core.edit.state') . "', 'com_" . $this->component
|
||||
. "');";
|
||||
}
|
||||
else
|
||||
{
|
||||
$allow[] = Indent::_(2) . "//" . Line::_(__Line__, __Class__)
|
||||
. " In the absence of better information, revert to the component permissions.";
|
||||
$allow[] = Indent::_(2)
|
||||
. "return parent::canEditState(\$record);";
|
||||
}
|
||||
|
||||
return implode(PHP_EOL, $allow);
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Access Switch Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class AccessSwitch extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Access Switch List Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class AccessSwitchList extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Admin Filter Type Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class AdminFilterType extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Alias Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class Alias extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -0,0 +1,42 @@
|
||||
<?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\Registry\Traits\IsArray;
|
||||
use VDM\Joomla\Interfaces\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Assets Rules Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class AssetsRules extends Registry implements Registryinterface
|
||||
{
|
||||
/**
|
||||
* Is an Array
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
use IsArray;
|
||||
|
||||
/**
|
||||
* Base switch to add values as string or array
|
||||
*
|
||||
* @var boolean
|
||||
* @since 3.2.0
|
||||
**/
|
||||
protected bool $addAsArray = true;
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Base64 Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class BaseSixFour extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Category Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class Category extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registry\Traits\GetString;
|
||||
use VDM\Joomla\Interfaces\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Category Code Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class CategoryCode extends Registry implements Registryinterface
|
||||
{
|
||||
/**
|
||||
* Get String Values
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
use GetString;
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Category Other Name Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class CategoryOtherName extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Check Box Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class CheckBox extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registry\Traits\VarExport;
|
||||
use VDM\Joomla\Interfaces\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Component Fields Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class ComponentFields extends Registry implements Registryinterface
|
||||
{
|
||||
/**
|
||||
* Var Export Values
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
use VarExport;
|
||||
}
|
||||
|
@@ -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\Interfaces\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Config Field Sets Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class ConfigFieldsets extends Registry implements Registryinterface
|
||||
{
|
||||
/**
|
||||
* Base switch to add values as string or array
|
||||
*
|
||||
* @var boolean
|
||||
* @since 3.2.0
|
||||
**/
|
||||
protected bool $addAsArray = true;
|
||||
}
|
||||
|
@@ -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\Registry\Traits\IsArray;
|
||||
use VDM\Joomla\Interfaces\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Config Field Sets Custom Field Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class ConfigFieldsetsCustomfield extends Registry implements Registryinterface
|
||||
{
|
||||
/**
|
||||
* Is an Array
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
use IsArray;
|
||||
}
|
||||
|
@@ -0,0 +1,89 @@
|
||||
<?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\Compiler\Utilities\Placefix;
|
||||
use VDM\Joomla\Abstraction\Registry\Traits\IsArray;
|
||||
use VDM\Joomla\Interfaces\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Compiler Content Multi
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
class ContentMulti extends Registry implements Registryinterface
|
||||
{
|
||||
/**
|
||||
* Is an Array
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
use IsArray;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->setSeparator('|');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get that the active keys from a path
|
||||
*
|
||||
* @param string $path The path to determine the location mapper.
|
||||
*
|
||||
* @return array|null The valid array of keys
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected function getActiveKeys(string $path): ?array
|
||||
{
|
||||
// Call the parent class's version of this method
|
||||
$keys = parent::getActiveKeys($path);
|
||||
|
||||
if ($keys === null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return $this->modelActiveKeys($keys);
|
||||
}
|
||||
|
||||
/**
|
||||
* Model that the active key
|
||||
*
|
||||
* @param array $keys The keys to the location mapper.
|
||||
*
|
||||
* @return array|null The valid array of key
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected function modelActiveKeys(array $keys): ?array
|
||||
{
|
||||
if (isset($keys[1]))
|
||||
{
|
||||
return [$keys[0], Placefix::_h($keys[1])];
|
||||
}
|
||||
|
||||
if (isset($keys[0]))
|
||||
{
|
||||
return [$keys[0]];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,71 @@
|
||||
<?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\Compiler\Utilities\Placefix;
|
||||
use VDM\Joomla\Interfaces\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Compiler Content One
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
class ContentOne extends Registry implements Registryinterface
|
||||
{
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->setSeparator(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get that the active keys from a path
|
||||
*
|
||||
* @param string $path The path to determine the location mapper.
|
||||
*
|
||||
* @return array|null The valid array of keys
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected function getActiveKeys(string $path): ?array
|
||||
{
|
||||
// Call the parent class's version of this method
|
||||
$keys = parent::getActiveKeys($path);
|
||||
|
||||
if ($keys === null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return $this->modelActiveKeys($keys);
|
||||
}
|
||||
|
||||
/**
|
||||
* Model that the active key
|
||||
*
|
||||
* @param array $keys The keys to the location mapper.
|
||||
*
|
||||
* @return array The valid array of key
|
||||
* @since 3.2.0
|
||||
*/
|
||||
protected function modelActiveKeys(array $keys): array
|
||||
{
|
||||
return [Placefix::_h($keys[0])];
|
||||
}
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Contributors Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class Contributors extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Custom Alias Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class CustomAlias extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Custom Field Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class CustomField extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registry\Traits\ToString;
|
||||
use VDM\Joomla\Interfaces\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Custom Field Links Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class CustomFieldLinks extends Registry implements Registryinterface
|
||||
{
|
||||
/**
|
||||
* To String Values
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
use ToString;
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Custom List Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class CustomList extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Custom Tabs Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class CustomTabs extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Database Keys Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class DatabaseKeys extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Database Tables Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class DatabaseTables extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -0,0 +1,42 @@
|
||||
<?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\Registry\Traits\IsArray;
|
||||
use VDM\Joomla\Interfaces\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Database Uninstall Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class DatabaseUninstall extends Registry implements Registryinterface
|
||||
{
|
||||
/**
|
||||
* Is an Array
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
use IsArray;
|
||||
|
||||
/**
|
||||
* Base switch to add values as string or array
|
||||
*
|
||||
* @var boolean
|
||||
* @since 3.2.0
|
||||
**/
|
||||
protected bool $addAsArray = true;
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Database Unique Guid Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class DatabaseUniqueGuid extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Database Unique Keys Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class DatabaseUniqueKeys extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Do Not Escape Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class DoNotEscape extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registry\Traits\ToString;
|
||||
use VDM\Joomla\Interfaces\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Dynamic Fields Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class DynamicFields extends Registry implements Registryinterface
|
||||
{
|
||||
/**
|
||||
* To String Values
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
use ToString;
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Extension Custom Fields Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class ExtensionCustomFields extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -0,0 +1,42 @@
|
||||
<?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\Registry\Traits\IsArray;
|
||||
use VDM\Joomla\Interfaces\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Extensions Params Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class ExtensionsParams extends Registry implements Registryinterface
|
||||
{
|
||||
/**
|
||||
* Is an Array
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
use IsArray;
|
||||
|
||||
/**
|
||||
* Base switch to add values as string or array
|
||||
*
|
||||
* @var boolean
|
||||
* @since 3.2.0
|
||||
**/
|
||||
protected bool $addAsArray = true;
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Field Group Control Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class FieldGroupControl extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registry\Traits\IsString;
|
||||
use VDM\Joomla\Interfaces\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Field Names Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class FieldNames extends Registry implements Registryinterface
|
||||
{
|
||||
/**
|
||||
* Is String Values
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
use IsString;
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Field Relations Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class FieldRelations extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Filter Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class Filter extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Footable Scripts Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class FootableScripts extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Front-end Params Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class FrontendParams extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Get As Lookup Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class GetAsLookup extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Get Module Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class GetModule extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Google Chart Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class GoogleChart extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Has Menu Global Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class HasMenuGlobal extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Has Permissions Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class HasPermissions extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registry\Traits\ToString;
|
||||
use VDM\Joomla\Interfaces\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Hidden Fields Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class HiddenFields extends Registry implements Registryinterface
|
||||
{
|
||||
/**
|
||||
* To String Values
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
use ToString;
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* History Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class History extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registry\Traits\ToString;
|
||||
use VDM\Joomla\Interfaces\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Integer Fields Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class IntegerFields extends Registry implements Registryinterface
|
||||
{
|
||||
/**
|
||||
* To String Values
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
use ToString;
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Items Method Eximport String Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class ItemsMethodEximportString extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Items Method List String Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class ItemsMethodListString extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Json Item Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class JsonItem extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registry\Traits\InArray;
|
||||
use VDM\Joomla\Interfaces\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Json Item Array Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class JsonItemArray extends Registry implements Registryinterface
|
||||
{
|
||||
/**
|
||||
* In Array
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
use InArray;
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Json String Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class JsonString extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registry\Traits\IsArray;
|
||||
use VDM\Joomla\Interfaces\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Language Messages Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class LanguageMessages extends Registry implements Registryinterface
|
||||
{
|
||||
/**
|
||||
* Is an Array
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
use IsArray;
|
||||
}
|
||||
|
@@ -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\Registry\Traits\Count;
|
||||
use VDM\Joomla\Interfaces\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Layout Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class Layout extends Registry implements Registryinterface
|
||||
{
|
||||
/**
|
||||
* Count Values
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
use Count;
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Layout Data Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class LayoutData extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Library Manager Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class LibraryManager extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* List Field Class Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class ListFieldClass extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* List Head Override Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class ListHeadOverride extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* List Join Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class ListJoin extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Lists Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class Lists extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Main Text Field Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class MainTextField extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registry\Traits\IsString;
|
||||
use VDM\Joomla\Interfaces\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Meta Data Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class MetaData extends Registry implements Registryinterface
|
||||
{
|
||||
/**
|
||||
* Is String Values
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
use IsString;
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Basic Field Model Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class ModelBasicField extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Expert Field Model Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class ModelExpertField extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Expert Field Initiator Model Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class ModelExpertFieldInitiator extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Medium Field Model Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class ModelMediumField extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Whmcs Field Model Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class ModelWhmcsField extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Moved Publishing Fields Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class MovedPublishingFields extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Mysql Table Setting Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class MysqlTableSetting extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registry\Traits\Count;
|
||||
use VDM\Joomla\Interfaces\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* New Publishing Fields Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class NewPublishingFields extends Registry implements Registryinterface
|
||||
{
|
||||
/**
|
||||
* Count Values
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
use Count;
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Order Zero Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class OrderZero extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Other Filter Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class OtherFilter extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Other Group Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class OtherGroup extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Other Join Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class OtherJoin extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Other Order Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class OtherOrder extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Other Query Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class OtherQuery extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
@@ -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\Registryinterface;
|
||||
use VDM\Joomla\Abstraction\Registry;
|
||||
|
||||
|
||||
/**
|
||||
* Other Where Builder Class
|
||||
*
|
||||
* @since 3.2.0
|
||||
*/
|
||||
final class OtherWhere extends Registry implements Registryinterface
|
||||
{
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user