Release of v3.2.0-beta8

Add Factory class to the J5 Event class. #1093.
This commit is contained in:
2024-03-20 14:19:16 +02:00
parent c90b1e0c8b
commit 91df280520
15 changed files with 64 additions and 57 deletions

View File

@ -40,24 +40,21 @@ class JFormFieldCustomfilelist extends JFormFieldList
protected function getOptions()
{
// get custom folder files
$localfolder = JComponentHelper::getParams('com_componentbuilder')->get('custom_folder_path', JPATH_COMPONENT_ADMINISTRATOR.'/custom');
$localfolder = \JComponentHelper::getParams('com_componentbuilder')->get('custom_folder_path', JPATH_COMPONENT_ADMINISTRATOR . '/custom');
// set the default
$options[] = JHtml::_('select.option', '', JText::sprintf('COM_COMPONENTBUILDER_PLEASE_ADD_FILES_TO_S',$localfolder));
// inport all needed classes
jimport('joomla.filesystem.file');
jimport('joomla.filesystem.folder');
$options[] = Html::_('select.option', '', Text::sprintf('COM_COMPONENTBUILDER_PLEASE_ADD_FILES_TO_S',$localfolder));
// setup the folder if it does not exist
if (!JFolder::exists($localfolder))
if (!\JFolder::exists($localfolder))
{
JFolder::create($localfolder);
\JFolder::create($localfolder);
}
// now check if there are files in the folder
if ($files = JFolder::files($localfolder))
if ($files = \JFolder::files($localfolder))
{
$options = array();
foreach ($files as $file)
{
$options[] = JHtml::_('select.option', $file, $file);
$options[] = Html::_('select.option', $file, $file);
}
}
return $options;

View File

@ -145,19 +145,20 @@
hint="COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_TARGET_HINT"
autocomplete="off"
/>
<!-- Value Field. Type: Text. (joomla) -->
<!-- Value Field. Type: Textarea. (joomla) -->
<field
type="text"
type="textarea"
name="value"
label="COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_VALUE_LABEL"
size="150"
rows="1"
cols="5"
default="default text"
description="COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_VALUE_DESCRIPTION"
class="text_area"
required="true"
filter="RAW"
message="COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_VALUE_MESSAGE"
class="text_area span12"
filter="RAW"
hint="COM_COMPONENTBUILDER_COMPONENT_PLACEHOLDERS_VALUE_HINT"
autocomplete="on"
required="true"
/>
</form>
</field>

View File

@ -110,19 +110,20 @@
hint="COM_COMPONENTBUILDER_PLACEHOLDER_TARGET_HINT"
autocomplete="off"
/>
<!-- Value Field. Type: Text. (joomla) -->
<!-- Value Field. Type: Textarea. (joomla) -->
<field
type="text"
type="textarea"
name="value"
label="COM_COMPONENTBUILDER_PLACEHOLDER_VALUE_LABEL"
size="150"
rows="1"
cols="5"
default="default text"
description="COM_COMPONENTBUILDER_PLACEHOLDER_VALUE_DESCRIPTION"
class="text_area"
required="true"
filter="RAW"
message="COM_COMPONENTBUILDER_PLACEHOLDER_VALUE_MESSAGE"
class="text_area span12"
filter="RAW"
hint="COM_COMPONENTBUILDER_PLACEHOLDER_VALUE_HINT"
autocomplete="on"
required="true"
/>
<!-- Note_placeholders_placedin Field. Type: Note. A None Database Field. (joomla) -->
<field type="note" name="note_placeholders_placedin" description="COM_COMPONENTBUILDER_PLACEHOLDER_NOTE_PLACEHOLDERS_PLACEDIN_DESCRIPTION" class="note_placeholders_placedin" />

View File

@ -163,12 +163,6 @@ class ComponentbuilderModelPlaceholder extends AdminModel
$item->metadata = $registry->toArray();
}
if (!empty($item->value))
{
// base64 Decode value.
$item->value = base64_decode($item->value);
}
if (empty($item->id))
{
@ -899,12 +893,6 @@ class ComponentbuilderModelPlaceholder extends AdminModel
// add the padding (needed)
$data['target'] = '[[[' . trim($data['target']) . ']]]';
// Set the value string to base64 string.
if (isset($data['value']))
{
$data['value'] = base64_encode($data['value']);
}
// Set the Params Items to data
if (isset($data['params']) && is_array($data['params']))
{

View File

@ -142,8 +142,6 @@ class ComponentbuilderModelPlaceholders extends ListModel
continue;
}
// decode value
$item->value = base64_decode($item->value);
}
}
@ -309,8 +307,6 @@ class ComponentbuilderModelPlaceholders extends ListModel
continue;
}
// decode value
$item->value = base64_decode($item->value);
// unset the values we don't want exported.
unset($item->asset_id);
unset($item->checked_out);