Release of v3.2.2-beta1
Fix subform set methods. Improved the Joomla Power Push path. Fix the metadata, metadesc, metakey database issue.
This commit is contained in:
@@ -46,7 +46,7 @@ final class MultiSubform implements MultiSubformInterface
|
||||
/**
|
||||
* Get a subform items
|
||||
*
|
||||
* @param array $getMap The the map to get the subfrom data
|
||||
* @param array $getMap The map to get the subfrom data
|
||||
*
|
||||
* Example:
|
||||
* $getMap = [
|
||||
@@ -94,8 +94,8 @@ final class MultiSubform implements MultiSubformInterface
|
||||
/**
|
||||
* Set a subform items
|
||||
*
|
||||
* @param array $items The list of items from the subform to set
|
||||
* @param array $setMap The the map to set the subfrom data
|
||||
* @param mixed $items The list of items from the subform to set
|
||||
* @param array $setMap The map to set the subfrom data
|
||||
*
|
||||
* Example:
|
||||
* $items,
|
||||
@@ -117,7 +117,7 @@ final class MultiSubform implements MultiSubformInterface
|
||||
* @return bool
|
||||
* @since 3.2.2
|
||||
*/
|
||||
public function set(array $items, array $setMap): bool
|
||||
public function set(mixed $items, array $setMap): bool
|
||||
{
|
||||
// Validate the core map presence and structure
|
||||
if (!isset($setMap['_core']) || !is_array($setMap['_core']) || !$this->validSetMap($setMap['_core']))
|
||||
@@ -125,6 +125,12 @@ final class MultiSubform implements MultiSubformInterface
|
||||
return false;
|
||||
}
|
||||
|
||||
// catch an empty set
|
||||
if (!is_array($items))
|
||||
{
|
||||
$items = []; // will delete all existing linked items :( not ideal, but real
|
||||
}
|
||||
|
||||
// Save the core data
|
||||
if (!$this->setSubformData($items, $setMap['_core']))
|
||||
{
|
||||
@@ -167,7 +173,7 @@ final class MultiSubform implements MultiSubformInterface
|
||||
* Set data based on provided map configuration.
|
||||
*
|
||||
* @param array $items The list of items from the subform to set
|
||||
* @param array $map The the map to set the subfrom data
|
||||
* @param array $map The map to set the subfrom data
|
||||
* @param array|null $coreData The core data to be appended with subform data
|
||||
*
|
||||
* @return bool
|
||||
|
Reference in New Issue
Block a user