forked from joomla/super-powers
Update 2024-06-25 2:41:22
This commit is contained in:
parent
245dd27b45
commit
ca77ad3dc7
78
src/bb30f709-53d2-446a-ab3d-300fe6de0bc8/README.md
Normal file
78
src/bb30f709-53d2-446a-ab3d-300fe6de0bc8/README.md
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
```
|
||||||
|
██████╗ ██████╗ ██╗ ██╗███████╗██████╗
|
||||||
|
██╔══██╗██╔═══██╗██║ ██║██╔════╝██╔══██╗
|
||||||
|
██████╔╝██║ ██║██║ █╗ ██║█████╗ ██████╔╝
|
||||||
|
██╔═══╝ ██║ ██║██║███╗██║██╔══╝ ██╔══██╗
|
||||||
|
██║ ╚██████╔╝╚███╔███╔╝███████╗██║ ██║
|
||||||
|
╚═╝ ╚═════╝ ╚══╝╚══╝ ╚══════╝╚═╝ ╚═╝
|
||||||
|
```
|
||||||
|
# interface MultiSubformInterface (Details)
|
||||||
|
> namespace: **VDM\Joomla\Interfaces\Data**
|
||||||
|
> extends: ****
|
||||||
|
```uml
|
||||||
|
@startuml
|
||||||
|
interface MultiSubformInterface #Lavender {
|
||||||
|
+ get(array $getMap) : ?array
|
||||||
|
+ set(array $items, array $setMap) : bool
|
||||||
|
}
|
||||||
|
|
||||||
|
note right of MultiSubformInterface::get
|
||||||
|
Get a subform items
|
||||||
|
Example:
|
||||||
|
$getMap = [
|
||||||
|
'_core' => [
|
||||||
|
'table' =>'data',
|
||||||
|
'linkValue' => $item->guid ?? '',
|
||||||
|
'linkKey' => 'look',
|
||||||
|
'field' => 'data',
|
||||||
|
'get' => ['guid','email','image','mobile_phone','website','dateofbirth']
|
||||||
|
],
|
||||||
|
'countries' => [
|
||||||
|
'table' =>'data_country',
|
||||||
|
'linkValue' => 'data:guid', // coretable:fieldname
|
||||||
|
'linkKey' => 'data',
|
||||||
|
'get' => ['guid','country','currency']
|
||||||
|
]
|
||||||
|
];
|
||||||
|
|
||||||
|
since: 3.2.2
|
||||||
|
return: ?array
|
||||||
|
end note
|
||||||
|
|
||||||
|
note right of MultiSubformInterface::set
|
||||||
|
Set a subform items
|
||||||
|
Example:
|
||||||
|
$items,
|
||||||
|
$setMap = [
|
||||||
|
'_core' => [
|
||||||
|
'table' =>'data',
|
||||||
|
'indexKey' => 'guid',
|
||||||
|
'linkKey' => 'look',
|
||||||
|
'linkValue' => $data['guid'] ?? ''
|
||||||
|
],
|
||||||
|
'countries' => [
|
||||||
|
'table' =>'data_country',
|
||||||
|
'indexKey' => 'guid',
|
||||||
|
'linkKey' => 'data',
|
||||||
|
'linkValue' => 'data:guid' // coretable:fieldname
|
||||||
|
]
|
||||||
|
];
|
||||||
|
|
||||||
|
since: 3.2.2
|
||||||
|
return: bool
|
||||||
|
end note
|
||||||
|
|
||||||
|
@enduml
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
```
|
||||||
|
██╗ ██████╗██████╗
|
||||||
|
██║██╔════╝██╔══██╗
|
||||||
|
██║██║ ██████╔╝
|
||||||
|
██ ██║██║ ██╔══██╗
|
||||||
|
╚█████╔╝╚██████╗██████╔╝
|
||||||
|
╚════╝ ╚═════╝╚═════╝
|
||||||
|
```
|
||||||
|
> Build with [Joomla Component Builder](https://git.vdm.dev/joomla/Component-Builder)
|
||||||
|
|
77
src/bb30f709-53d2-446a-ab3d-300fe6de0bc8/code.php
Normal file
77
src/bb30f709-53d2-446a-ab3d-300fe6de0bc8/code.php
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
<?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\Interfaces\Data;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Data Multi Subform Interface
|
||||||
|
*
|
||||||
|
* @since 3.2.2
|
||||||
|
*/
|
||||||
|
interface MultiSubformInterface
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Get a subform items
|
||||||
|
*
|
||||||
|
* @param array $getMap The the map to get the subfrom data
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* $getMap = [
|
||||||
|
* '_core' => [
|
||||||
|
* 'table' =>'data',
|
||||||
|
* 'linkValue' => $item->guid ?? '',
|
||||||
|
* 'linkKey' => 'look',
|
||||||
|
* 'field' => 'data',
|
||||||
|
* 'get' => ['guid','email','image','mobile_phone','website','dateofbirth']
|
||||||
|
* ],
|
||||||
|
* 'countries' => [
|
||||||
|
* 'table' =>'data_country',
|
||||||
|
* 'linkValue' => 'data:guid', // coretable:fieldname
|
||||||
|
* 'linkKey' => 'data',
|
||||||
|
* 'get' => ['guid','country','currency']
|
||||||
|
* ]
|
||||||
|
* ];
|
||||||
|
*
|
||||||
|
* @return array|null The subform
|
||||||
|
* @since 3.2.2
|
||||||
|
*/
|
||||||
|
public function get(array $getMap): ?array;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* $items,
|
||||||
|
* $setMap = [
|
||||||
|
* '_core' => [
|
||||||
|
* 'table' =>'data',
|
||||||
|
* 'indexKey' => 'guid',
|
||||||
|
* 'linkKey' => 'look',
|
||||||
|
* 'linkValue' => $data['guid'] ?? ''
|
||||||
|
* ],
|
||||||
|
* 'countries' => [
|
||||||
|
* 'table' =>'data_country',
|
||||||
|
* 'indexKey' => 'guid',
|
||||||
|
* 'linkKey' => 'data',
|
||||||
|
* 'linkValue' => 'data:guid' // coretable:fieldname
|
||||||
|
* ]
|
||||||
|
* ];
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
* @since 3.2.2
|
||||||
|
*/
|
||||||
|
public function set(array $items, array $setMap): bool;
|
||||||
|
}
|
||||||
|
|
54
src/bb30f709-53d2-446a-ab3d-300fe6de0bc8/code.power
Normal file
54
src/bb30f709-53d2-446a-ab3d-300fe6de0bc8/code.power
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
/**
|
||||||
|
* Get a subform items
|
||||||
|
*
|
||||||
|
* @param array $getMap The the map to get the subfrom data
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* $getMap = [
|
||||||
|
* '_core' => [
|
||||||
|
* 'table' =>'data',
|
||||||
|
* 'linkValue' => $item->guid ?? '',
|
||||||
|
* 'linkKey' => 'look',
|
||||||
|
* 'field' => 'data',
|
||||||
|
* 'get' => ['guid','email','image','mobile_phone','website','dateofbirth']
|
||||||
|
* ],
|
||||||
|
* 'countries' => [
|
||||||
|
* 'table' =>'data_country',
|
||||||
|
* 'linkValue' => 'data:guid', // coretable:fieldname
|
||||||
|
* 'linkKey' => 'data',
|
||||||
|
* 'get' => ['guid','country','currency']
|
||||||
|
* ]
|
||||||
|
* ];
|
||||||
|
*
|
||||||
|
* @return array|null The subform
|
||||||
|
* @since 3.2.2
|
||||||
|
*/
|
||||||
|
public function get(array $getMap): ?array;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* $items,
|
||||||
|
* $setMap = [
|
||||||
|
* '_core' => [
|
||||||
|
* 'table' =>'data',
|
||||||
|
* 'indexKey' => 'guid',
|
||||||
|
* 'linkKey' => 'look',
|
||||||
|
* 'linkValue' => $data['guid'] ?? ''
|
||||||
|
* ],
|
||||||
|
* 'countries' => [
|
||||||
|
* 'table' =>'data_country',
|
||||||
|
* 'indexKey' => 'guid',
|
||||||
|
* 'linkKey' => 'data',
|
||||||
|
* 'linkValue' => 'data:guid' // coretable:fieldname
|
||||||
|
* ]
|
||||||
|
* ];
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
* @since 3.2.2
|
||||||
|
*/
|
||||||
|
public function set(array $items, array $setMap): bool;
|
19
src/bb30f709-53d2-446a-ab3d-300fe6de0bc8/settings.json
Normal file
19
src/bb30f709-53d2-446a-ab3d-300fe6de0bc8/settings.json
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"add_head": "0",
|
||||||
|
"add_licensing_template": "2",
|
||||||
|
"extends": "",
|
||||||
|
"guid": "bb30f709-53d2-446a-ab3d-300fe6de0bc8",
|
||||||
|
"implements": null,
|
||||||
|
"load_selection": null,
|
||||||
|
"name": "MultiSubformInterface",
|
||||||
|
"power_version": "1.0.0",
|
||||||
|
"system_name": "VDM.Interfaces.Data.MultiSubformInterface",
|
||||||
|
"type": "interface",
|
||||||
|
"use_selection": null,
|
||||||
|
"extendsinterfaces": null,
|
||||||
|
"namespace": "[[[NamespacePrefix]]]\\Joomla\\Interfaces.Data.MultiSubformInterface",
|
||||||
|
"description": "Data Multi Subform Interface\r\n\r\n@since 3.2.2",
|
||||||
|
"licensing_template": "\/**\r\n * @package Joomla.Component.Builder\r\n *\r\n * @created 4th September, 2022\r\n * @author Llewellyn van der Merwe <https:\/\/dev.vdm.io>\r\n * @git Joomla Component Builder <https:\/\/git.vdm.dev\/joomla\/Component-Builder>\r\n * @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.\r\n * @license GNU General Public License version 2 or later; see LICENSE.txt\r\n *\/\r\n",
|
||||||
|
"head": "",
|
||||||
|
"composer": ""
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user