Adds new helper classes.
This commit is contained in:
@ -20,6 +20,7 @@ use VDM\Joomla\Utilities\JsonHelper;
|
||||
use VDM\Joomla\Utilities\ArrayHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GetHelper;
|
||||
use VDM\Joomla\Utilities\FileHelper;
|
||||
use VDM\Joomla\Utilities\String\FieldHelper;
|
||||
use VDM\Joomla\Utilities\String\TypeHelper;
|
||||
use VDM\Joomla\Utilities\String\ClassfunctionHelper;
|
||||
@ -182,6 +183,13 @@ class Get
|
||||
*/
|
||||
public $componentData;
|
||||
|
||||
/**
|
||||
* The Switch to add Powers data
|
||||
*
|
||||
* @var boolean
|
||||
*/
|
||||
protected $addPower;
|
||||
|
||||
/**
|
||||
* The Powers data
|
||||
*
|
||||
@ -1044,6 +1052,10 @@ class Get
|
||||
) == 1) ? true : false;
|
||||
$this->debugLinenr = ((int) $config['debuglinenr'] == 0) ? false
|
||||
: (((int) $config['debuglinenr'] == 1) ? true : $global);
|
||||
// set if powers should be added to component (default is true)
|
||||
$global = true;
|
||||
$this->addPower = (isset($config['powers']) && (int) $config['powers'] == 0)
|
||||
? false : ((isset($config['powers']) && (int) $config['powers'] == 1) ? true : $global);
|
||||
// set the current user
|
||||
$this->user = JFactory::getUser();
|
||||
// Get a db connection.
|
||||
@ -2853,14 +2865,14 @@ class Get
|
||||
{
|
||||
// load the field details
|
||||
$required
|
||||
= ComponentbuilderHelper::getBetween(
|
||||
= GetHelper::between(
|
||||
$fieldValues['settings']->xml,
|
||||
'required="', '"'
|
||||
);
|
||||
$required = ($required === 'true'
|
||||
|| $required === '1') ? 'yes' : 'no';
|
||||
$filter
|
||||
= ComponentbuilderHelper::getBetween(
|
||||
= GetHelper::between(
|
||||
$fieldValues['settings']->xml,
|
||||
'filter="', '"'
|
||||
);
|
||||
@ -2909,7 +2921,7 @@ class Get
|
||||
if (!ComponentbuilderHelper::fieldCheck($type))
|
||||
{
|
||||
$conditionValue['match_extends']
|
||||
= ComponentbuilderHelper::getBetween(
|
||||
= GetHelper::between(
|
||||
$fieldValue['settings']->xml,
|
||||
'extends="', '"'
|
||||
);
|
||||
@ -3850,7 +3862,7 @@ class Get
|
||||
$field->xml = $this->setDynamicValues(json_decode($field->xml));
|
||||
|
||||
// check if we have validate (validation rule set)
|
||||
$validationRule = ComponentbuilderHelper::getBetween(
|
||||
$validationRule = GetHelper::between(
|
||||
$field->xml, 'validate="', '"'
|
||||
);
|
||||
if (StringHelper::check($validationRule))
|
||||
@ -4403,7 +4415,7 @@ class Get
|
||||
|| strtolower($type_name) === 'customuser')
|
||||
{
|
||||
$type = TypeHelper::safe(
|
||||
ComponentbuilderHelper::getBetween(
|
||||
GetHelper::between(
|
||||
$field['settings']->xml, 'type="', '"'
|
||||
)
|
||||
);
|
||||
@ -4430,7 +4442,7 @@ class Get
|
||||
else
|
||||
{
|
||||
$type = TypeHelper::safe(
|
||||
ComponentbuilderHelper::getBetween(
|
||||
GetHelper::between(
|
||||
$field['settings']->xml, 'type="', '"'
|
||||
)
|
||||
);
|
||||
@ -4502,7 +4514,7 @@ class Get
|
||||
if ($type_name === 'category')
|
||||
{
|
||||
// quick check if this is a category linked to view page
|
||||
$requeSt_id = ComponentbuilderHelper::getBetween(
|
||||
$requeSt_id = GetHelper::between(
|
||||
$field['settings']->xml, 'name="', '"'
|
||||
);
|
||||
if (strpos($requeSt_id, '_request_id') !== false
|
||||
@ -4522,17 +4534,17 @@ class Get
|
||||
{
|
||||
// check if we should use another Text Name as this views name
|
||||
$otherName = $this->setPlaceholders(
|
||||
ComponentbuilderHelper::getBetween(
|
||||
GetHelper::between(
|
||||
$field['settings']->xml, 'othername="', '"'
|
||||
), $this->placeholders
|
||||
);
|
||||
$otherViews = $this->setPlaceholders(
|
||||
ComponentbuilderHelper::getBetween(
|
||||
GetHelper::between(
|
||||
$field['settings']->xml, 'views="', '"'
|
||||
), $this->placeholders
|
||||
);
|
||||
$otherView = $this->setPlaceholders(
|
||||
ComponentbuilderHelper::getBetween(
|
||||
GetHelper::between(
|
||||
$field['settings']->xml, 'view="', '"'
|
||||
), $this->placeholders
|
||||
);
|
||||
@ -4575,7 +4587,7 @@ class Get
|
||||
// get value from xml
|
||||
$xml = FieldHelper::safe(
|
||||
$this->setPlaceholders(
|
||||
ComponentbuilderHelper::getBetween(
|
||||
GetHelper::between(
|
||||
$field['settings']->xml, 'name="', '"'
|
||||
), $this->placeholders
|
||||
)
|
||||
@ -4880,7 +4892,7 @@ class Get
|
||||
);
|
||||
// get the table name
|
||||
$_searchQuery
|
||||
= ComponentbuilderHelper::getBetween(
|
||||
= GetHelper::between(
|
||||
$customQueryString, '$query->from(', ')'
|
||||
);
|
||||
if (StringHelper::check(
|
||||
@ -4889,7 +4901,7 @@ class Get
|
||||
&& strpos($_searchQuery, '#__') !== false)
|
||||
{
|
||||
$_queryName
|
||||
= ComponentbuilderHelper::getBetween(
|
||||
= GetHelper::between(
|
||||
$_searchQuery, '#__', "'"
|
||||
);
|
||||
if (!StringHelper::check(
|
||||
@ -4897,7 +4909,7 @@ class Get
|
||||
))
|
||||
{
|
||||
$_queryName
|
||||
= ComponentbuilderHelper::getBetween(
|
||||
= GetHelper::between(
|
||||
$_searchQuery, '#__', '"'
|
||||
);
|
||||
}
|
||||
@ -5898,10 +5910,10 @@ class Get
|
||||
if (!ArrayHelper::check($templates))
|
||||
{
|
||||
// set the Template data
|
||||
$temp1 = ComponentbuilderHelper::getAllBetween(
|
||||
$temp1 = GetHelper::allBetween(
|
||||
$default, "\$this->loadTemplate('", "')"
|
||||
);
|
||||
$temp2 = ComponentbuilderHelper::getAllBetween(
|
||||
$temp2 = GetHelper::allBetween(
|
||||
$default, '$this->loadTemplate("', '")'
|
||||
);
|
||||
if (ArrayHelper::check($temp1)
|
||||
@ -5957,10 +5969,10 @@ class Get
|
||||
if (!ArrayHelper::check($layouts))
|
||||
{
|
||||
// set the Layout data
|
||||
$lay1 = ComponentbuilderHelper::getAllBetween(
|
||||
$lay1 = GetHelper::allBetween(
|
||||
$default, "JLayoutHelper::render('", "',"
|
||||
);
|
||||
$lay2 = ComponentbuilderHelper::getAllBetween(
|
||||
$lay2 = GetHelper::allBetween(
|
||||
$default, 'JLayoutHelper::render("', '",'
|
||||
);
|
||||
if (ArrayHelper::check($lay1)
|
||||
@ -6557,10 +6569,10 @@ class Get
|
||||
// first get the Joomla .JText._()
|
||||
if (in_array('Joomla' . '.JText._(', $langStringTargets))
|
||||
{
|
||||
$jsTEXT[] = ComponentbuilderHelper::getAllBetween(
|
||||
$jsTEXT[] = GetHelper::allBetween(
|
||||
$content, "Joomla" . ".JText._('", "'"
|
||||
);
|
||||
$jsTEXT[] = ComponentbuilderHelper::getAllBetween(
|
||||
$jsTEXT[] = GetHelper::allBetween(
|
||||
$content, 'Joomla' . '.JText._("', '"'
|
||||
);
|
||||
// combine into one array
|
||||
@ -6580,10 +6592,10 @@ class Get
|
||||
// now get the JText: :script()
|
||||
if (in_array('JText:' . ':script(', $langStringTargets))
|
||||
{
|
||||
$scTEXT[] = ComponentbuilderHelper::getAllBetween(
|
||||
$scTEXT[] = GetHelper::allBetween(
|
||||
$content, "JText:" . ":script('", "'"
|
||||
);
|
||||
$scTEXT[] = ComponentbuilderHelper::getAllBetween(
|
||||
$scTEXT[] = GetHelper::allBetween(
|
||||
$content, 'JText:' . ':script("', '"'
|
||||
);
|
||||
// combine into one array
|
||||
@ -6601,10 +6613,10 @@ class Get
|
||||
// now do the little trick for JustTEXT: :_('Just uppercase text');
|
||||
if (in_array('JustTEXT:' . ':_(', $langStringTargets))
|
||||
{
|
||||
$langOnly[] = ComponentbuilderHelper::getAllBetween(
|
||||
$langOnly[] = GetHelper::allBetween(
|
||||
$content, "JustTEXT:" . ":_('", "')"
|
||||
);
|
||||
$langOnly[] = ComponentbuilderHelper::getAllBetween(
|
||||
$langOnly[] = GetHelper::allBetween(
|
||||
$content, 'JustTEXT:' . ':_("', '")'
|
||||
);
|
||||
// merge lang only
|
||||
@ -6620,10 +6632,10 @@ class Get
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$langCheck[] = ComponentbuilderHelper::getAllBetween(
|
||||
$langCheck[] = GetHelper::allBetween(
|
||||
$content, $langStringTarget . "'", "'"
|
||||
);
|
||||
$langCheck[] = ComponentbuilderHelper::getAllBetween(
|
||||
$langCheck[] = GetHelper::allBetween(
|
||||
$content, $langStringTarget . '"', '"'
|
||||
);
|
||||
}
|
||||
@ -7316,7 +7328,7 @@ class Get
|
||||
}
|
||||
// target content
|
||||
$bucket = array();
|
||||
$found = ComponentbuilderHelper::getAllBetween(
|
||||
$found = GetHelper::allBetween(
|
||||
$string, '[EXTERNA' . 'LCODE=', ']'
|
||||
);
|
||||
if (ArrayHelper::check($found))
|
||||
@ -7421,7 +7433,7 @@ class Get
|
||||
{
|
||||
// get the data string (code)
|
||||
$this->externalCodeString[$target_key]
|
||||
= ComponentbuilderHelper::getFileContents($target_url);
|
||||
= FileHelper::getContent($target_url);
|
||||
// check if we must cut this
|
||||
if (isset($this->externalCodeCutter[$target_key]) &&
|
||||
$this->externalCodeCutter[$target_key])
|
||||
@ -7628,7 +7640,7 @@ class Get
|
||||
}
|
||||
// the ids found in this content
|
||||
$bucket = array();
|
||||
$found = ComponentbuilderHelper::getAllBetween(
|
||||
$found = GetHelper::allBetween(
|
||||
$string, '[CUSTO' . 'MCODE=', ']'
|
||||
);
|
||||
if (ArrayHelper::check($found))
|
||||
@ -8620,7 +8632,7 @@ class Get
|
||||
*/
|
||||
public function getPower($id)
|
||||
{
|
||||
if ($this->setPower($id))
|
||||
if ($this->addPower && $this->setPower($id))
|
||||
{
|
||||
return $this->powers[$id];
|
||||
}
|
||||
@ -8934,12 +8946,16 @@ class Get
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// we failed to get the power
|
||||
// we failed to get the power,
|
||||
// so we raise an error message
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf('<p>Power <b>id:%s</b> not found!</p>', $id),
|
||||
'Error'
|
||||
);
|
||||
// only if id exist
|
||||
if ($id > 0)
|
||||
{
|
||||
$this->app->enqueueMessage(
|
||||
JText::sprintf('<p>Power <b>id:%s</b> not found!</p>', $id),
|
||||
'Error'
|
||||
);
|
||||
}
|
||||
// let's not try again
|
||||
$this->statePowers[$id] = false;
|
||||
|
||||
@ -9525,7 +9541,7 @@ class Get
|
||||
&& isset($field['settings']))
|
||||
{
|
||||
if (($old_default
|
||||
= ComponentbuilderHelper::getBetween(
|
||||
= GetHelper::between(
|
||||
$field['settings']->xml,
|
||||
'default="', '"', false
|
||||
)) !== false)
|
||||
@ -10470,7 +10486,7 @@ class Get
|
||||
&& isset($field['settings']))
|
||||
{
|
||||
if (($old_default
|
||||
= ComponentbuilderHelper::getBetween(
|
||||
= GetHelper::between(
|
||||
$field['settings']->xml,
|
||||
'default="', '"', false
|
||||
)) !== false)
|
||||
@ -11427,7 +11443,7 @@ class Get
|
||||
if (strpos($script, 'HASHSTRING((((') !== false)
|
||||
{
|
||||
// get the strings
|
||||
$values = ComponentbuilderHelper::getAllBetween(
|
||||
$values = GetHelper::allBetween(
|
||||
$script, 'HASHSTRING((((', '))))'
|
||||
);
|
||||
$locker = array();
|
||||
@ -11445,7 +11461,7 @@ class Get
|
||||
if (strpos($script, 'HASHFILE((((') !== false)
|
||||
{
|
||||
// get the strings
|
||||
$values = ComponentbuilderHelper::getAllBetween(
|
||||
$values = GetHelper::allBetween(
|
||||
$script, 'HASHFILE((((', '))))'
|
||||
);
|
||||
$locker = array();
|
||||
@ -11453,7 +11469,7 @@ class Get
|
||||
foreach ($values as $path)
|
||||
{
|
||||
// we first get the file if it exist
|
||||
if ($value = ComponentbuilderHelper::getFileContents($path))
|
||||
if ($value = FileHelper::getContent($path))
|
||||
{
|
||||
// now we hash the file content
|
||||
$locker['HASHFILE((((' . $path . '))))']
|
||||
@ -11487,7 +11503,7 @@ class Get
|
||||
if (strpos($script, 'LOCKBASE64((((') !== false)
|
||||
{
|
||||
// get the strings
|
||||
$values = ComponentbuilderHelper::getAllBetween(
|
||||
$values = GetHelper::allBetween(
|
||||
$script, 'LOCKBASE64((((', '))))'
|
||||
);
|
||||
$locker = array();
|
||||
@ -11642,14 +11658,14 @@ class Get
|
||||
protected function guiCodeSearch(&$file, &$placeholders, &$today, &$target)
|
||||
{
|
||||
// get file content
|
||||
$file_conent = ComponentbuilderHelper::getFileContents($file);
|
||||
$file_conent = FileHelper::getContent($file);
|
||||
|
||||
$guiCode = array();
|
||||
// we add a new search for the GUI CODE Blocks
|
||||
$guiCode[] = ComponentbuilderHelper::getAllBetween(
|
||||
$guiCode[] = GetHelper::allBetween(
|
||||
$file_conent, '/***[JCB' . 'GUI<>', '/***[/JCBGUI' . '$$$$]***/'
|
||||
);
|
||||
$guiCode[] = ComponentbuilderHelper::getAllBetween(
|
||||
$guiCode[] = GetHelper::allBetween(
|
||||
$file_conent, '<!--[JCB' . 'GUI<>', '<!--[/JCBGUI' . '$$$$]-->'
|
||||
);
|
||||
|
||||
@ -11899,10 +11915,10 @@ class Get
|
||||
// set language data
|
||||
foreach ($langStringTargets as $langStringTarget)
|
||||
{
|
||||
$langCheck[] = ComponentbuilderHelper::getAllBetween(
|
||||
$langCheck[] = GetHelper::allBetween(
|
||||
$string, $langStringTarget . "'", "'"
|
||||
);
|
||||
$langCheck[] = ComponentbuilderHelper::getAllBetween(
|
||||
$langCheck[] = GetHelper::allBetween(
|
||||
$string, $langStringTarget . "'", "'"
|
||||
);
|
||||
}
|
||||
|
@ -18,6 +18,8 @@ use Joomla\CMS\Filesystem\Folder;
|
||||
use VDM\Joomla\Utilities\StringHelper;
|
||||
use VDM\Joomla\Utilities\ArrayHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GetHelper;
|
||||
use VDM\Joomla\Utilities\FileHelper;
|
||||
|
||||
|
||||
/**
|
||||
@ -1136,7 +1138,7 @@ class Structure extends Get
|
||||
// set file name
|
||||
$fileName = basename($url['url']);
|
||||
// get the file contents
|
||||
$data = ComponentbuilderHelper::getFileContents(
|
||||
$data = FileHelper::getContent(
|
||||
$url['url']
|
||||
);
|
||||
// build sub path
|
||||
@ -1527,7 +1529,7 @@ class Structure extends Get
|
||||
// set file name
|
||||
$fileName = basename($url['url']);
|
||||
// get the file contents
|
||||
$data = ComponentbuilderHelper::getFileContents(
|
||||
$data = FileHelper::getContent(
|
||||
$url['url']
|
||||
);
|
||||
// build sub path
|
||||
@ -1672,7 +1674,7 @@ class Structure extends Get
|
||||
// set file name
|
||||
$fileName = basename($url['url']);
|
||||
// get the file contents
|
||||
$data = ComponentbuilderHelper::getFileContents(
|
||||
$data = FileHelper::getContent(
|
||||
$url['url']
|
||||
);
|
||||
// build sub path
|
||||
@ -1887,7 +1889,7 @@ class Structure extends Get
|
||||
*/
|
||||
public function writeFile($path, $data)
|
||||
{
|
||||
return ComponentbuilderHelper::writeFile($path, $data);
|
||||
return FileHelper::write($path, $data);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2591,7 +2593,7 @@ class Structure extends Get
|
||||
'trim',
|
||||
explode(
|
||||
',',
|
||||
ComponentbuilderHelper::getBetween(
|
||||
GetHelper::between(
|
||||
$multi_field['settings']->xml, 'fields="', '"'
|
||||
)
|
||||
)
|
||||
@ -2895,7 +2897,7 @@ class Structure extends Get
|
||||
if (File::exists($custom_settings))
|
||||
{
|
||||
$version_data = json_decode(
|
||||
ComponentbuilderHelper::getFileContents(
|
||||
FileHelper::getContent(
|
||||
$custom_settings
|
||||
)
|
||||
);
|
||||
@ -2903,7 +2905,7 @@ class Structure extends Get
|
||||
else
|
||||
{
|
||||
$version_data = json_decode(
|
||||
ComponentbuilderHelper::getFileContents(
|
||||
FileHelper::getContent(
|
||||
$this->templatePath . '/settings.json'
|
||||
)
|
||||
);
|
||||
|
@ -16,6 +16,7 @@ defined('_JEXEC') or die('Restricted access');
|
||||
use VDM\Joomla\Utilities\StringHelper;
|
||||
use VDM\Joomla\Utilities\ArrayHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GetHelper;
|
||||
use VDM\Joomla\Utilities\String\FieldHelper;
|
||||
|
||||
/**
|
||||
@ -4167,7 +4168,7 @@ class Fields extends Structure
|
||||
elseif ($property['name'] === 'validate')
|
||||
{
|
||||
// check if we have validate (validation rule set)
|
||||
$xmlValue = ComponentbuilderHelper::getBetween(
|
||||
$xmlValue = GetHelper::between(
|
||||
$field['settings']->xml, 'validate="', '"'
|
||||
);
|
||||
if (StringHelper::check($xmlValue))
|
||||
@ -4183,7 +4184,7 @@ class Fields extends Structure
|
||||
{
|
||||
// get value & replace the placeholders
|
||||
$xmlValue = $this->setPlaceholders(
|
||||
ComponentbuilderHelper::getBetween(
|
||||
GetHelper::between(
|
||||
$field['settings']->xml, $property['name'] . '="',
|
||||
'"'
|
||||
), $placeholders
|
||||
@ -4208,7 +4209,7 @@ class Fields extends Structure
|
||||
$fieldAttributes['custom'][$phpKey][$phpLine]
|
||||
= $this->setDynamicValues(
|
||||
ComponentbuilderHelper::openValidBase64(
|
||||
ComponentbuilderHelper::getBetween(
|
||||
GetHelper::between(
|
||||
$field['settings']->xml,
|
||||
$property['name'] . '="', '"'
|
||||
)
|
||||
@ -4221,7 +4222,7 @@ class Fields extends Structure
|
||||
{
|
||||
// load the php for the custom field file
|
||||
$fieldAttributes['custom']['prime_php']
|
||||
= (int) ComponentbuilderHelper::getBetween(
|
||||
= (int) GetHelper::between(
|
||||
$field['settings']->xml, $property['name'] . '="', '"'
|
||||
);
|
||||
}
|
||||
@ -4229,7 +4230,7 @@ class Fields extends Structure
|
||||
{
|
||||
// load the class that is being extended
|
||||
$fieldAttributes['custom']['extends']
|
||||
= ComponentbuilderHelper::getBetween(
|
||||
= GetHelper::between(
|
||||
$field['settings']->xml, 'extends="', '"'
|
||||
);
|
||||
}
|
||||
@ -4239,7 +4240,7 @@ class Fields extends Structure
|
||||
$fieldAttributes['custom']['view']
|
||||
= StringHelper::safe(
|
||||
$this->setPlaceholders(
|
||||
ComponentbuilderHelper::getBetween(
|
||||
GetHelper::between(
|
||||
$field['settings']->xml, 'view="', '"'
|
||||
), $placeholders
|
||||
)
|
||||
@ -4251,7 +4252,7 @@ class Fields extends Structure
|
||||
$fieldAttributes['custom']['views']
|
||||
= StringHelper::safe(
|
||||
$this->setPlaceholders(
|
||||
ComponentbuilderHelper::getBetween(
|
||||
GetHelper::between(
|
||||
$field['settings']->xml, 'views="', '"'
|
||||
), $placeholders
|
||||
)
|
||||
@ -4262,7 +4263,7 @@ class Fields extends Structure
|
||||
// load the component name & replace the placeholders
|
||||
$fieldAttributes['custom']['component']
|
||||
= $this->setPlaceholders(
|
||||
ComponentbuilderHelper::getBetween(
|
||||
GetHelper::between(
|
||||
$field['settings']->xml, 'component="', '"'
|
||||
), $placeholders
|
||||
);
|
||||
@ -4272,7 +4273,7 @@ class Fields extends Structure
|
||||
// load the main table that is queried & replace the placeholders
|
||||
$fieldAttributes['custom']['table']
|
||||
= $this->setPlaceholders(
|
||||
ComponentbuilderHelper::getBetween(
|
||||
GetHelper::between(
|
||||
$field['settings']->xml, 'table="', '"'
|
||||
), $placeholders
|
||||
);
|
||||
@ -4282,7 +4283,7 @@ class Fields extends Structure
|
||||
// load the text key
|
||||
$fieldAttributes['custom']['text']
|
||||
= StringHelper::safe(
|
||||
ComponentbuilderHelper::getBetween(
|
||||
GetHelper::between(
|
||||
$field['settings']->xml, 'value_field="', '"'
|
||||
)
|
||||
);
|
||||
@ -4292,7 +4293,7 @@ class Fields extends Structure
|
||||
// load the id key
|
||||
$fieldAttributes['custom']['id']
|
||||
= StringHelper::safe(
|
||||
ComponentbuilderHelper::getBetween(
|
||||
GetHelper::between(
|
||||
$field['settings']->xml, 'key_field="', '"'
|
||||
)
|
||||
);
|
||||
@ -4309,7 +4310,7 @@ class Fields extends Structure
|
||||
{
|
||||
// load the button string value if found
|
||||
$xmlValue = (string) StringHelper::safe(
|
||||
ComponentbuilderHelper::getBetween(
|
||||
GetHelper::between(
|
||||
$field['settings']->xml, 'button="', '"'
|
||||
)
|
||||
);
|
||||
@ -4338,7 +4339,7 @@ class Fields extends Structure
|
||||
}
|
||||
elseif ($property['name'] === 'multiple')
|
||||
{
|
||||
$xmlValue = (string) ComponentbuilderHelper::getBetween(
|
||||
$xmlValue = (string) GetHelper::between(
|
||||
$field['settings']->xml, $property['name'] . '="', '"'
|
||||
);
|
||||
// add the multipal
|
||||
@ -4352,7 +4353,7 @@ class Fields extends Structure
|
||||
&& ($typeName === 'note'
|
||||
|| $typeName === 'spacer'))
|
||||
{
|
||||
$xmlValue = ComponentbuilderHelper::getBetween(
|
||||
$xmlValue = GetHelper::between(
|
||||
$field['settings']->xml, 'class="', '"'
|
||||
);
|
||||
// add the type class
|
||||
@ -4372,7 +4373,7 @@ class Fields extends Structure
|
||||
{
|
||||
// set the rest of the fields
|
||||
$xmlValue = (string) $this->setPlaceholders(
|
||||
ComponentbuilderHelper::getBetween(
|
||||
GetHelper::between(
|
||||
$field['settings']->xml, $property['name'] . '="',
|
||||
'"'
|
||||
), $placeholders
|
||||
@ -4473,7 +4474,7 @@ class Fields extends Structure
|
||||
// validate that the default field is set
|
||||
elseif ($property['name'] === 'default'
|
||||
&& ($xmlValidateValue
|
||||
= ComponentbuilderHelper::getBetween(
|
||||
= GetHelper::between(
|
||||
$field['settings']->xml, 'default="', '"', 'none-set'
|
||||
)) !== 'none-set')
|
||||
{
|
||||
@ -4511,7 +4512,7 @@ class Fields extends Structure
|
||||
if (isset($fieldAttributes['name']))
|
||||
{
|
||||
// check if we have class value for the list view of this field
|
||||
$listclass = ComponentbuilderHelper::getBetween(
|
||||
$listclass = GetHelper::between(
|
||||
$field['settings']->xml, 'listclass="', '"'
|
||||
);
|
||||
if (StringHelper::check($listclass))
|
||||
@ -4520,7 +4521,7 @@ class Fields extends Structure
|
||||
= $listclass;
|
||||
}
|
||||
// check if we find reason to remove this field from being escaped
|
||||
$escaped = ComponentbuilderHelper::getBetween(
|
||||
$escaped = GetHelper::between(
|
||||
$field['settings']->xml, 'escape="', '"'
|
||||
);
|
||||
if (StringHelper::check($escaped))
|
||||
@ -4529,7 +4530,7 @@ class Fields extends Structure
|
||||
= $fieldAttributes['name'];
|
||||
}
|
||||
// check if we have display switch for dynamic placement
|
||||
$display = ComponentbuilderHelper::getBetween(
|
||||
$display = GetHelper::between(
|
||||
$field['settings']->xml, 'display="', '"'
|
||||
);
|
||||
if (StringHelper::check($display))
|
||||
@ -4540,7 +4541,7 @@ class Fields extends Structure
|
||||
if (!isset($fieldAttributes['validate']))
|
||||
{
|
||||
// check if we have validate (validation rule set)
|
||||
$validationRule = ComponentbuilderHelper::getBetween(
|
||||
$validationRule = GetHelper::between(
|
||||
$field['settings']->xml, 'validate="', '"'
|
||||
);
|
||||
if (StringHelper::check($validationRule))
|
||||
@ -4753,7 +4754,7 @@ class Fields extends Structure
|
||||
{
|
||||
// get it from the field xml string
|
||||
$listFieldName = (string) $this->setPlaceholders(
|
||||
ComponentbuilderHelper::getBetween(
|
||||
GetHelper::between(
|
||||
$field['settings']->xml, 'label="',
|
||||
'"'
|
||||
), $this->placeholders
|
||||
@ -4954,7 +4955,7 @@ class Fields extends Structure
|
||||
}
|
||||
// get the xml extension name
|
||||
$_extension = $this->setPlaceholders(
|
||||
ComponentbuilderHelper::getBetween(
|
||||
GetHelper::between(
|
||||
$field['settings']->xml, 'extension="', '"'
|
||||
), $this->placeholders
|
||||
);
|
||||
|
@ -18,6 +18,8 @@ use Joomla\CMS\Filesystem\Folder;
|
||||
use VDM\Joomla\Utilities\StringHelper;
|
||||
use VDM\Joomla\Utilities\ArrayHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GetHelper;
|
||||
use VDM\Joomla\Utilities\FileHelper;
|
||||
use VDM\Joomla\Utilities\MathHelper;
|
||||
|
||||
/**
|
||||
@ -2389,7 +2391,7 @@ class Interpretation extends Fields
|
||||
foreach ($params as $field)
|
||||
{
|
||||
// some switch to see if it should be added to front end params
|
||||
$target = ComponentbuilderHelper::getBetween(
|
||||
$target = GetHelper::between(
|
||||
$field, 'display="', '"'
|
||||
);
|
||||
if (!StringHelper::check($target)
|
||||
@ -5548,12 +5550,10 @@ class Interpretation extends Fields
|
||||
}
|
||||
// set the custom buttons CUSTOM_BUTTONS_CONTROLLER
|
||||
$this->fileContentDynamic[$viewCodeName][$this->hhh . $TARGET
|
||||
. '_CUSTOM_BUTTONS_CONTROLLER' . $this->hhh]
|
||||
= '';
|
||||
. '_CUSTOM_BUTTONS_CONTROLLER' . $this->hhh] = '';
|
||||
// set the custom buttons CUSTOM_BUTTONS_METHOD
|
||||
$this->fileContentDynamic[$viewCodeName][$this->hhh . $TARGET
|
||||
. '_CUSTOM_BUTTONS_METHOD' . $this->hhh]
|
||||
= '';
|
||||
. '_CUSTOM_BUTTONS_METHOD' . $this->hhh] = '';
|
||||
}
|
||||
elseif (3 == $type)
|
||||
{
|
||||
@ -6456,7 +6456,7 @@ class Interpretation extends Fields
|
||||
$path = '/' . trim($folder['path'], '/');
|
||||
if (isset($folder['rename']) && 1 == $folder['rename'])
|
||||
{
|
||||
if ($_paths = ComponentbuilderHelper::getAllFilePaths(
|
||||
if ($_paths = FileHelper::getPaths(
|
||||
$this->componentPath . $path
|
||||
))
|
||||
{
|
||||
@ -6466,7 +6466,7 @@ class Interpretation extends Fields
|
||||
else
|
||||
{
|
||||
$path = $path . '/' . trim($folder['folder'], '/');
|
||||
if ($_paths = ComponentbuilderHelper::getAllFilePaths(
|
||||
if ($_paths = FileHelper::getPaths(
|
||||
$this->componentPath . $path
|
||||
))
|
||||
{
|
||||
@ -7309,7 +7309,7 @@ class Interpretation extends Fields
|
||||
{
|
||||
if (File::exists($file['path']))
|
||||
{
|
||||
$string = ComponentbuilderHelper::getFileContents(
|
||||
$string = FileHelper::getContent(
|
||||
$file['path']
|
||||
);
|
||||
$buket['static'][] = $this->getInbetweenStrings(
|
||||
@ -7326,7 +7326,7 @@ class Interpretation extends Fields
|
||||
if (File::exists($doc['path']))
|
||||
{
|
||||
$string
|
||||
= ComponentbuilderHelper::getFileContents(
|
||||
= FileHelper::getContent(
|
||||
$doc['path']
|
||||
);
|
||||
$buket[$view][] = $this->getInbetweenStrings(
|
||||
@ -17709,7 +17709,7 @@ class Interpretation extends Fields
|
||||
elseif (ComponentbuilderHelper::fieldCheck($type, 'text'))
|
||||
{
|
||||
// check to get the key words if set
|
||||
$keywords = ComponentbuilderHelper::getBetween(
|
||||
$keywords = GetHelper::between(
|
||||
$options, 'keywords="', '"'
|
||||
);
|
||||
if (StringHelper::check($keywords))
|
||||
@ -17730,7 +17730,7 @@ class Interpretation extends Fields
|
||||
}
|
||||
}
|
||||
// check to ket string length if set
|
||||
$length = ComponentbuilderHelper::getBetween(
|
||||
$length = GetHelper::between(
|
||||
$options, 'length="', '"'
|
||||
);
|
||||
if (StringHelper::check($length))
|
||||
@ -23212,7 +23212,7 @@ class Interpretation extends Fields
|
||||
{
|
||||
// get all the mothods that should load date to the view
|
||||
$this->DashboardGetCustomData
|
||||
= ComponentbuilderHelper::getAllBetween(
|
||||
= GetHelper::allBetween(
|
||||
$this->componentData->php_dashboard_methods,
|
||||
'public function get', '()'
|
||||
);
|
||||
@ -24274,10 +24274,10 @@ class Interpretation extends Fields
|
||||
if (1 == $timer) // this is before the admin views are build
|
||||
{
|
||||
// start loading Global params
|
||||
$autorName = ComponentbuilderHelper::htmlEscape(
|
||||
$autorName = StringHelper::html(
|
||||
$this->componentData->author
|
||||
);
|
||||
$autorEmail = ComponentbuilderHelper::htmlEscape(
|
||||
$autorEmail = StringHelper::html(
|
||||
$this->componentData->email
|
||||
);
|
||||
$this->extensionsParams[] = '"autorName":"' . $autorName
|
||||
@ -24366,13 +24366,13 @@ class Interpretation extends Fields
|
||||
// set global params to db on install
|
||||
$fieldName = StringHelper::safe(
|
||||
$this->setPlaceholders(
|
||||
ComponentbuilderHelper::getBetween(
|
||||
GetHelper::between(
|
||||
$xmlField, 'name="', '"'
|
||||
), $placeholders
|
||||
)
|
||||
);
|
||||
$fieldDefault = $this->setPlaceholders(
|
||||
ComponentbuilderHelper::getBetween(
|
||||
GetHelper::between(
|
||||
$xmlField, 'default="', '"'
|
||||
), $placeholders
|
||||
);
|
||||
@ -24486,7 +24486,7 @@ class Interpretation extends Fields
|
||||
elseif (strpos($id_field, '_request_id') !== false)
|
||||
{
|
||||
// not loaded to a tab "view" name
|
||||
$_viewRequest = ComponentbuilderHelper::getBetween(
|
||||
$_viewRequest = GetHelper::between(
|
||||
$id_field, 'name="', '_request_id'
|
||||
);
|
||||
$searchIdKe = 'name="' . $_viewRequest
|
||||
@ -24514,7 +24514,7 @@ class Interpretation extends Fields
|
||||
elseif (strpos($catid_field, '_request_catid') !== false)
|
||||
{
|
||||
// not loaded to a tab "view" name
|
||||
$_viewRequestC = ComponentbuilderHelper::getBetween(
|
||||
$_viewRequestC = GetHelper::between(
|
||||
$catid_field, 'name="', '_request_catid'
|
||||
);
|
||||
$searchCatidKe = 'name="' . $_viewRequestC
|
||||
@ -24539,7 +24539,7 @@ class Interpretation extends Fields
|
||||
elseif (strpos($field, '_menu"') !== false)
|
||||
{
|
||||
// not loaded to a tab "view" name
|
||||
$_tabLower = ComponentbuilderHelper::getBetween(
|
||||
$_tabLower = GetHelper::between(
|
||||
$field, 'name="', '_menu"'
|
||||
);
|
||||
// set the values needed to insure route is done correclty
|
||||
@ -24561,7 +24561,7 @@ class Interpretation extends Fields
|
||||
|
||||
protected function setRequestValues($view, $field, $search, $target, $store)
|
||||
{
|
||||
$key = ComponentbuilderHelper::getBetween($field, $search, '"');
|
||||
$key = GetHelper::between($field, $search, '"');
|
||||
if (!StringHelper::check($key))
|
||||
{
|
||||
// is not having special var
|
||||
@ -24602,7 +24602,7 @@ class Interpretation extends Fields
|
||||
$bucket = array();
|
||||
foreach ($tabFields as $tabField)
|
||||
{
|
||||
$display = ComponentbuilderHelper::getBetween(
|
||||
$display = GetHelper::between(
|
||||
$tabField, 'display="', '"'
|
||||
);
|
||||
if (!StringHelper::check($display)
|
||||
@ -24908,7 +24908,7 @@ class Interpretation extends Fields
|
||||
);
|
||||
$cbWebsite = htmlspecialchars(
|
||||
$contributor['website'], ENT_XML1, 'UTF-8'
|
||||
); // ComponentbuilderHelper::htmlEscape($contributor['website']);
|
||||
); // StringHelper::html($contributor['website']);
|
||||
// load to the $fieldsets
|
||||
$this->configFieldSets[] = $this->_t(2)
|
||||
. '<field type="spacer" name="spacerContributor' . $counter
|
||||
|
@ -18,6 +18,7 @@ use Joomla\CMS\Filesystem\Folder;
|
||||
use VDM\Joomla\Utilities\StringHelper;
|
||||
use VDM\Joomla\Utilities\ArrayHelper;
|
||||
use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\FileHelper;
|
||||
|
||||
/**
|
||||
* Infusion class
|
||||
@ -2796,7 +2797,7 @@ class Infusion extends Interpretation
|
||||
$xmlPath = $this->componentPath . '/' . $this->componentCodeName
|
||||
. '.xml';
|
||||
// get the content in xml
|
||||
$componentXML = ComponentbuilderHelper::getFileContents(
|
||||
$componentXML = FileHelper::getContent(
|
||||
$xmlPath
|
||||
);
|
||||
// update the xml content
|
||||
|
Reference in New Issue
Block a user