Tweaked the category naming. Improved the autoloader for composer.
This commit is contained in:
parent
548af56265
commit
d78e3bb215
@ -146,11 +146,11 @@ TODO
|
||||
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
||||
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
|
||||
+ *First Build*: 30th April, 2015
|
||||
+ *Last Build*: 11th October, 2019
|
||||
+ *Last Build*: 14th October, 2019
|
||||
+ *Version*: 2.10.1
|
||||
+ *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved.
|
||||
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
||||
+ *Line count*: **253755**
|
||||
+ *Line count*: **253791**
|
||||
+ *Field count*: **1347**
|
||||
+ *File count*: **1618**
|
||||
+ *Folder count*: **261**
|
||||
|
@ -146,11 +146,11 @@ TODO
|
||||
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
||||
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
|
||||
+ *First Build*: 30th April, 2015
|
||||
+ *Last Build*: 11th October, 2019
|
||||
+ *Last Build*: 14th October, 2019
|
||||
+ *Version*: 2.10.1
|
||||
+ *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved.
|
||||
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
||||
+ *Line count*: **253755**
|
||||
+ *Line count*: **253791**
|
||||
+ *Field count*: **1347**
|
||||
+ *File count*: **1618**
|
||||
+ *Folder count*: **261**
|
||||
|
@ -2800,7 +2800,7 @@ class Fields extends Structure
|
||||
}
|
||||
else
|
||||
{
|
||||
$tempName = $view_name_single . ' category';
|
||||
$tempName = $view_name_list . ' categories';
|
||||
}
|
||||
// set lang
|
||||
$listLangName = $langView . '_' . ComponentbuilderHelper::safeFieldName($tempName, true);
|
||||
|
@ -13394,7 +13394,7 @@ class Interpretation extends Fields
|
||||
{
|
||||
$otherViews = $name_list;
|
||||
// build lang
|
||||
$langName = 'Category For<br />' . ComponentbuilderHelper::safeString($otherViews, 'W');
|
||||
$langName = 'Categories For<br />' . ComponentbuilderHelper::safeString($otherViews, 'W');
|
||||
}
|
||||
if (!in_array($otherViews, $catArray))
|
||||
{
|
||||
|
@ -3787,23 +3787,41 @@ abstract class ComponentbuilderHelper
|
||||
/**
|
||||
* Composer Switch
|
||||
**/
|
||||
protected static $composer = false;
|
||||
protected static $composer = array();
|
||||
|
||||
/**
|
||||
* Load the Composer Vendors
|
||||
**/
|
||||
public static function composerAutoload()
|
||||
public static function composerAutoload($target = 'vdm_io')
|
||||
{
|
||||
// insure we load the composer vendors only once
|
||||
if (!self::$composer)
|
||||
// insure we load the composer vendor only once
|
||||
if (!isset(self::$composer[$target]))
|
||||
{
|
||||
// load the autoloader
|
||||
require_once JPATH_SITE.'/libraries/vdm_io/vendor/autoload.php';
|
||||
// get the function name
|
||||
$functionName = self::safeString('compose' . $target);
|
||||
// check if method exist
|
||||
if (method_exists(__CLASS__, $functionName))
|
||||
{
|
||||
return self::{$functionName}();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return self::$composer[$target];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Load the Composer Vendor vdm_io
|
||||
**/
|
||||
protected static function composevdm_io()
|
||||
{
|
||||
// load the autoloader for vdm_io
|
||||
require_once JPATH_SITE . '/libraries/vdm_io/vendor/autoload.php';
|
||||
// do not load again
|
||||
self::$composer = true;
|
||||
}
|
||||
self::$composer['vdm_io'] = true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* bc math wrapper (very basic not for accounting)
|
||||
*
|
||||
@ -5614,12 +5632,12 @@ abstract class ComponentbuilderHelper
|
||||
if ($user->authorise('field.access', 'com_componentbuilder') && $user->authorise('field.submenu', 'com_componentbuilder'))
|
||||
{
|
||||
JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_FIELDS'), 'index.php?option=com_componentbuilder&view=fields', $submenu === 'fields');
|
||||
JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_FIELD_FIELD_CATEGORY'), 'index.php?option=com_categories&view=categories&extension=com_componentbuilder.fields', $submenu === 'categories.fields');
|
||||
JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_FIELD_FIELDS_CATEGORIES'), 'index.php?option=com_categories&view=categories&extension=com_componentbuilder.fields', $submenu === 'categories.fields');
|
||||
}
|
||||
if ($user->authorise('fieldtype.access', 'com_componentbuilder') && $user->authorise('fieldtype.submenu', 'com_componentbuilder'))
|
||||
{
|
||||
JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_FIELDTYPES'), 'index.php?option=com_componentbuilder&view=fieldtypes', $submenu === 'fieldtypes');
|
||||
JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_FIELDTYPE_FIELDTYPE_CATEGORY'), 'index.php?option=com_categories&view=categories&extension=com_componentbuilder.fieldtypes', $submenu === 'categories.fieldtypes');
|
||||
JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_FIELDTYPE_FIELDTYPES_CATEGORIES'), 'index.php?option=com_categories&view=categories&extension=com_componentbuilder.fieldtypes', $submenu === 'categories.fieldtypes');
|
||||
}
|
||||
if ($user->authorise('language_translation.access', 'com_componentbuilder') && $user->authorise('language_translation.submenu', 'com_componentbuilder'))
|
||||
{
|
||||
|
@ -4258,9 +4258,9 @@ COM_COMPONENTBUILDER_DASHBOARD_CUSTOM_CODES="Custom Codes<br /><br />"
|
||||
COM_COMPONENTBUILDER_DASHBOARD_DYNAMIC_GETS="Dynamic Gets<br /><br />"
|
||||
COM_COMPONENTBUILDER_DASHBOARD_DYNAMIC_GET_ADD="Add Dynamic Get<br /><br />"
|
||||
COM_COMPONENTBUILDER_DASHBOARD_FIELDS="Fields<br /><br />"
|
||||
COM_COMPONENTBUILDER_DASHBOARD_FIELDS_CATID="Category For<br />Fields"
|
||||
COM_COMPONENTBUILDER_DASHBOARD_FIELDS_CATID="Categories For<br />Fields"
|
||||
COM_COMPONENTBUILDER_DASHBOARD_FIELDTYPES="Fieldtypes<br /><br />"
|
||||
COM_COMPONENTBUILDER_DASHBOARD_FIELDTYPES_CATID="Category For<br />Fieldtypes"
|
||||
COM_COMPONENTBUILDER_DASHBOARD_FIELDTYPES_CATID="Categories For<br />Fieldtypes"
|
||||
COM_COMPONENTBUILDER_DASHBOARD_FIELD_ADD="Add Field<br /><br />"
|
||||
COM_COMPONENTBUILDER_DASHBOARD_GET_SNIPPETS="Get Snippets<br /><br />"
|
||||
COM_COMPONENTBUILDER_DASHBOARD_HELP_DOCUMENTS="Help Documents<br /><br />"
|
||||
@ -4801,7 +4801,7 @@ COM_COMPONENTBUILDER_FIELDTYPE_EXAMPLE_HINT="Value/Example Here"
|
||||
COM_COMPONENTBUILDER_FIELDTYPE_EXAMPLE_LABEL="Value/Example"
|
||||
COM_COMPONENTBUILDER_FIELDTYPE_EXAMPLE_MESSAGE="Error! Please add value/example here."
|
||||
COM_COMPONENTBUILDER_FIELDTYPE_FIELDS="Fields"
|
||||
COM_COMPONENTBUILDER_FIELDTYPE_FIELDTYPE_CATEGORY="Fieldtype Category"
|
||||
COM_COMPONENTBUILDER_FIELDTYPE_FIELDTYPES_CATEGORIES="Fieldtypes Categories"
|
||||
COM_COMPONENTBUILDER_FIELDTYPE_FIFTY="50"
|
||||
COM_COMPONENTBUILDER_FIELDTYPE_FLOAT="FLOAT"
|
||||
COM_COMPONENTBUILDER_FIELDTYPE_HAS_DEFAULTS="Has Defaults"
|
||||
@ -4938,10 +4938,10 @@ COM_COMPONENTBUILDER_FIELD_DOUBLE="DOUBLE"
|
||||
COM_COMPONENTBUILDER_FIELD_EDIT="Editing the Field"
|
||||
COM_COMPONENTBUILDER_FIELD_ELEVEN="11"
|
||||
COM_COMPONENTBUILDER_FIELD_ERROR_UNIQUE_ALIAS="Another Field has the same alias."
|
||||
COM_COMPONENTBUILDER_FIELD_FIELDS_CATEGORIES="Fields Categories"
|
||||
COM_COMPONENTBUILDER_FIELD_FIELDTYPE="Fieldtype"
|
||||
COM_COMPONENTBUILDER_FIELD_FIELDTYPE_DESCRIPTION="Set the field type"
|
||||
COM_COMPONENTBUILDER_FIELD_FIELDTYPE_LABEL="Type"
|
||||
COM_COMPONENTBUILDER_FIELD_FIELD_CATEGORY="Field Category"
|
||||
COM_COMPONENTBUILDER_FIELD_FIFTY="50"
|
||||
COM_COMPONENTBUILDER_FIELD_FLOAT="FLOAT"
|
||||
COM_COMPONENTBUILDER_FIELD_HELPNOTE_LABEL="Field Information"
|
||||
|
@ -74,7 +74,7 @@ $can = ComponentbuilderHelper::getActions('field');
|
||||
<?php echo JText::_('COM_COMPONENTBUILDER_FIELD_STORE_LABEL'); ?>
|
||||
</th>
|
||||
<th data-breakpoints="all" data-type="html" data-sort-use="text">
|
||||
<?php echo JText::_('COM_COMPONENTBUILDER_FIELD_FIELD_CATEGORY'); ?>
|
||||
<?php echo JText::_('COM_COMPONENTBUILDER_FIELD_FIELDS_CATEGORIES'); ?>
|
||||
</th>
|
||||
<th width="10" data-breakpoints="xs sm md">
|
||||
<?php echo JText::_('COM_COMPONENTBUILDER_FIELD_STATUS'); ?>
|
||||
|
@ -48,7 +48,7 @@ defined('_JEXEC') or die('Restricted access');
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_FIELD_STORE_LABEL', 'store', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
<th class="nowrap" >
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_FIELD_FIELD_CATEGORY', 'catid', $this->listDirn, $this->listOrder); ?>
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_FIELD_FIELDS_CATEGORIES', 'catid', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
<?php if ($this->canState): ?>
|
||||
<th width="10" class="nowrap center" >
|
||||
|
@ -408,7 +408,7 @@ class ComponentbuilderViewFields extends JViewLegacy
|
||||
'a.indexes' => JText::_('COM_COMPONENTBUILDER_FIELD_INDEXES_LABEL'),
|
||||
'a.null_switch' => JText::_('COM_COMPONENTBUILDER_FIELD_NULL_SWITCH_LABEL'),
|
||||
'a.store' => JText::_('COM_COMPONENTBUILDER_FIELD_STORE_LABEL'),
|
||||
'c.category_title' => JText::_('COM_COMPONENTBUILDER_FIELD_FIELD_CATEGORY'),
|
||||
'c.category_title' => JText::_('COM_COMPONENTBUILDER_FIELD_FIELDS_CATEGORIES'),
|
||||
'a.id' => JText::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ defined('_JEXEC') or die('Restricted access');
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_FIELDTYPE_SHORT_DESCRIPTION_LABEL', 'short_description', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
<th class="nowrap" >
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_FIELDTYPE_FIELDTYPE_CATEGORY', 'catid', $this->listDirn, $this->listOrder); ?>
|
||||
<?php echo JHtml::_('grid.sort', 'COM_COMPONENTBUILDER_FIELDTYPE_FIELDTYPES_CATEGORIES', 'catid', $this->listDirn, $this->listOrder); ?>
|
||||
</th>
|
||||
<?php if ($this->canState): ?>
|
||||
<th width="10" class="nowrap center" >
|
||||
|
@ -249,7 +249,7 @@ class ComponentbuilderViewFieldtypes extends JViewLegacy
|
||||
'a.published' => JText::_('JSTATUS'),
|
||||
'a.name' => JText::_('COM_COMPONENTBUILDER_FIELDTYPE_NAME_LABEL'),
|
||||
'a.short_description' => JText::_('COM_COMPONENTBUILDER_FIELDTYPE_SHORT_DESCRIPTION_LABEL'),
|
||||
'c.category_title' => JText::_('COM_COMPONENTBUILDER_FIELDTYPE_FIELDTYPE_CATEGORY'),
|
||||
'c.category_title' => JText::_('COM_COMPONENTBUILDER_FIELDTYPE_FIELDTYPES_CATEGORIES'),
|
||||
'a.id' => JText::_('JGRID_HEADING_ID')
|
||||
);
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension type="component" version="3.2" method="upgrade">
|
||||
<name>COM_COMPONENTBUILDER</name>
|
||||
<creationDate>11th October, 2019</creationDate>
|
||||
<creationDate>14th October, 2019</creationDate>
|
||||
<author>Llewellyn van der Merwe</author>
|
||||
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
|
||||
<authorUrl>http://www.joomlacomponentbuilder.com</authorUrl>
|
||||
|
@ -3787,23 +3787,41 @@ abstract class ComponentbuilderHelper
|
||||
/**
|
||||
* Composer Switch
|
||||
**/
|
||||
protected static $composer = false;
|
||||
protected static $composer = array();
|
||||
|
||||
/**
|
||||
* Load the Composer Vendors
|
||||
**/
|
||||
public static function composerAutoload()
|
||||
public static function composerAutoload($target = 'vdm_io')
|
||||
{
|
||||
// insure we load the composer vendors only once
|
||||
if (!self::$composer)
|
||||
// insure we load the composer vendor only once
|
||||
if (!isset(self::$composer[$target]))
|
||||
{
|
||||
// load the autoloader
|
||||
require_once JPATH_SITE.'/libraries/vdm_io/vendor/autoload.php';
|
||||
// get the function name
|
||||
$functionName = self::safeString('compose' . $target);
|
||||
// check if method exist
|
||||
if (method_exists(__CLASS__, $functionName))
|
||||
{
|
||||
return self::{$functionName}();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return self::$composer[$target];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Load the Composer Vendor vdm_io
|
||||
**/
|
||||
protected static function composevdm_io()
|
||||
{
|
||||
// load the autoloader for vdm_io
|
||||
require_once JPATH_SITE . '/libraries/vdm_io/vendor/autoload.php';
|
||||
// do not load again
|
||||
self::$composer = true;
|
||||
}
|
||||
self::$composer['vdm_io'] = true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* bc math wrapper (very basic not for accounting)
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user