mirror of
https://github.com/SuiteCRM/SuiteCRM-Core.git
synced 2026-07-30 00:30:19 +08:00
Merge commit 'de4bf25cb3' into release/8.4.0-beta
# Conflicts:
# public/legacy/data/SugarBean.php
# public/legacy/include/Smarty/plugins/function.sugarvar.php
# public/legacy/include/SugarDateTime.php
# public/legacy/include/database/MysqliManager.php
# public/legacy/modules/Alerts/metadata/listviewdefs.php
# public/legacy/modules/SugarFeed/Dashlets/SugarFeedDashlet/SugarFeedDashlet.php
# public/legacy/modules/Trackers/metadata/SearchFields.php
# public/legacy/modules/Trackers/metadata/listviewdefs.php
# public/legacy/modules/UpgradeWizard/SugarMerge/EditViewMerge.php
# public/legacy/suitecrm_version.php
22 lines
No EOL
553 B
PHP
22 lines
No EOL
553 B
PHP
<?php
|
|
namespace Api\V8\Helper;
|
|
#[\AllowDynamicProperties]
|
|
class VarDefHelper
|
|
{
|
|
/**
|
|
* @param \SugarBean $bean
|
|
*
|
|
* @return array
|
|
*/
|
|
public function getAllRelationships(\SugarBean $bean)
|
|
{
|
|
$relations = [];
|
|
$linkedFields = $bean->get_linked_fields();
|
|
foreach ($linkedFields as $relation => $varDef) {
|
|
if (isset($varDef['module']) && $bean->load_relationship($relation)) {
|
|
$relations[$relation] = $varDef['module'];
|
|
}
|
|
}
|
|
return $relations;
|
|
}
|
|
} |