From 350cd38d9d8b38962db3bd1cf194f1a72590161e Mon Sep 17 00:00:00 2001 From: hail-cookies <81558994+hail-cookies@users.noreply.github.com> Date: Tue, 1 Apr 2025 15:08:32 +0200 Subject: [PATCH 1/7] REF LookupMapping --- Behaviors/OrderingBehavior.php | 2 + CommonLogic/DataSheets/DataSheetMapper.php | 8 +- .../DataSheets/Mappings/LookupMapping.php | 212 ++++++++++-------- 3 files changed, 129 insertions(+), 93 deletions(-) diff --git a/Behaviors/OrderingBehavior.php b/Behaviors/OrderingBehavior.php index cf38a0664..48c5aa7d7 100644 --- a/Behaviors/OrderingBehavior.php +++ b/Behaviors/OrderingBehavior.php @@ -19,6 +19,7 @@ use exface\Core\Factories\ConditionGroupFactory; use exface\Core\Interfaces\Events\DataSheetTransactionEventInterface; use exface\Core\Interfaces\Events\EventInterface; +use exface\Core\Interfaces\Events\EventManagerInterface; use exface\Core\Interfaces\Exceptions\DataSheetExceptionInterface; use exface\Core\Interfaces\Model\BehaviorInterface; use exface\Core\Interfaces\Events\DataSheetEventInterface; @@ -102,6 +103,7 @@ class OrderingBehavior extends AbstractBehavior protected function registerEventListeners(): BehaviorInterface { $priority = $this->getPriority(); + $priority = is_numeric($priority) ? $priority : EventManagerInterface::PRIORITY_MIN; $onBeforeHandle = array($this, 'handleOnBefore'); $this->getWorkbench()->eventManager()->addListener(OnBeforeCreateDataEvent::getEventName(), $onBeforeHandle, $priority); diff --git a/CommonLogic/DataSheets/DataSheetMapper.php b/CommonLogic/DataSheets/DataSheetMapper.php index 432ea0747..61ee5b2ba 100644 --- a/CommonLogic/DataSheets/DataSheetMapper.php +++ b/CommonLogic/DataSheets/DataSheetMapper.php @@ -901,9 +901,9 @@ public function getMappings() : array * {@inheritDoc} * @see \exface\Core\Interfaces\DataSheets\DataSheetMapperInterface::addMapping() */ - public function addMapping(DataMappingInterface $mapping) : DataSheetMapperInterface + public function addMapping(DataMappingInterface $map) : DataSheetMapperInterface { - $this->mappings[] = $mapping; + $this->mappings[] = $map; return $this; } @@ -1342,8 +1342,8 @@ protected function setColumnToJsonMappings(UxonObject $uxon) : DataSheetMapperIn * Looks up a value in a separate data sheet and places it in the to-column * * @uxon-property lookup_mappings - * @uxon-type \exface\Core\CommonLogic\DataSheets\Mappings\DataColumnToJsonMapping[] - * @uxon-template [{"to": "", "lookup_object_alias": "", "lookup_column": "", "match": [{"from": "", "lookup":""}]}] + * @uxon-type \exface\Core\CommonLogic\DataSheets\Mappings\LookupMapping[] + * @uxon-template [{"lookup_object_alias": "", "lookup_column": "", "to": "", "match": [{"from": "", "lookup":""}]}] * * @param UxonObject $uxon * @return DataSheetMapperInterface diff --git a/CommonLogic/DataSheets/Mappings/LookupMapping.php b/CommonLogic/DataSheets/Mappings/LookupMapping.php index 8ceaec90c..09ba3c39b 100644 --- a/CommonLogic/DataSheets/Mappings/LookupMapping.php +++ b/CommonLogic/DataSheets/Mappings/LookupMapping.php @@ -4,11 +4,12 @@ use exface\Core\CommonLogic\UxonObject; use exface\Core\Factories\DataSheetFactory; use exface\Core\Factories\ExpressionFactory; +use exface\Core\Interfaces\DataSheets\DataMappingInterface; use exface\Core\Interfaces\DataSheets\DataSheetInterface; use exface\Core\Interfaces\Model\ExpressionInterface; -use exface\Core\Interfaces\DataSheets\LookupMappingInterface; use exface\Core\Exceptions\DataSheets\DataMappingConfigurationError; use exface\Core\Interfaces\Debug\LogBookInterface; +use exface\Core\Interfaces\Model\MetaObjectInterface; /** * Looks up a value in a separate data sheet and places it in the to-column @@ -20,9 +21,9 @@ * "to_object_alias": "exface.Core.OBJECT", * "lookup_mappings": [ * { - * "to": "UID", * "lookup_object_alias": "exface.Core.OBJECT", - * "lookup_column": "UID", + * "lookup": "UID", + * "to": "UID", * "match": [ * { * "from": "OBJECT__ALIAS", @@ -36,32 +37,105 @@ * @author Andrej Kabachnik * */ -class LookupMapping extends AbstractDataSheetMapping implements LookupMappingInterface +class LookupMapping extends AbstractDataSheetMapping { - private $lookupExpression = null; + private MetaObjectInterface|null $lookupObject = null; - private $toExpression = null; + private ExpressionInterface|null $lookupExpression = null; - private $createRowInEmptyData = true; + private ExpressionInterface|null $toExpression = null; + + private bool $createRowInEmptyData = true; - private $matchesUxon = null; + private UxonObject|null $requiredMatchesUxon = null; + private array $requiredMatchesCached = []; + /** * * {@inheritDoc} - * @see \exface\Core\Interfaces\DataSheets\LookupMappingInterface::getLookupExpression() + * @see \exface\Core\Interfaces\DataSheets\DataMappingInterface::map() */ - public function getLookupExpression() + public function map(DataSheetInterface $fromSheet, DataSheetInterface $toSheet, LogBookInterface $logbook = null) : DataSheetInterface { - return $this->lookupExpression; + $lookupExpr = $this->getLookupExpression(); + $toExpr = $this->getToExpression(); + + $log = "Lookup `{$lookupExpr->__toString()}` -> `{$toExpr->__toString()}`."; + + $lookupSheet = DataSheetFactory::createFromObjectIdOrAlias($this->getWorkbench(), $this->getLookupObject()); + $lookupSheet->getColumns()->addFromExpression($lookupExpr); + + $fromColumns = $fromSheet->getColumns(); + $lookupFilters = $lookupSheet->getFilters(); + + foreach ($this->getRequiredMatches() as $match) { + $fromColumns->addFromExpression($match['lookup']); + // TODO pre-filter to improve performance? + } + + $lookupSheet->dataRead(); + + foreach ($lookupSheet->getRows() as $lookupRow) { + + } + + $logbook?->addLine($log); + + return $toSheet; + } + + /** + * Returns an array of required matches - each providing pairs of expressions in the from-sheet and in the + * lookup-sheet + */ + protected function getRequiredMatches() : array + { + if( empty($this->requiredMatchesUxon) || + !$this->requiredMatchesUxon->isArray()) { + return []; + } + + if(!empty($this->requiredMatchesCached)) { + return $this->requiredMatchesCached; + } + + $result = []; + $fromObject = $this->getMapper()->getFromMetaObject(); + $lookupObject = $this->getLookupObject(); + $workBench = $this->getWorkbench(); + + foreach ($this->requiredMatchesUxon as $match) { + $result[] = [ + 'from' => ExpressionFactory::createFromString($workBench, ($match['from']), $fromObject), + 'lookup' => ExpressionFactory::createFromString($workBench, $match['lookup'], $lookupObject) + ]; + } + + $this->requiredMatchesCached = $result; + return $result; } /** * * {@inheritDoc} - * @see \exface\Core\Interfaces\DataSheets\LookupMappingInterface::setLookupExpression() + * @see \exface\Core\Interfaces\DataSheets\DataMappingInterface::getRequiredExpressions() */ - public function setLookupExpression(ExpressionInterface $expression) + public function getRequiredExpressions(DataSheetInterface $dataSheet) : array + { + $expressions = []; + foreach ($this->getRequiredMatches() as $match) { + $expressions[] = $match['from']; + } + return $expressions; + } + + public function getLookupExpression() : ExpressionInterface + { + return $this->lookupExpression; + } + + public function setLookupExpression(ExpressionInterface $expression) : LookupMapping { if ($expression->isReference()){ throw new DataMappingConfigurationError($this, 'Cannot use widget links as expressions in data mappers!'); @@ -72,35 +146,46 @@ public function setLookupExpression(ExpressionInterface $expression) /** * The attribute (or formula) to look up in the lookup-object and place into the to-column - * - * @uxon-property lookup_column + * + * @uxon-property lookup * @uxon-type metamodel:expression - * - * {@inheritDoc} - * @see \exface\Core\Interfaces\DataSheets\DataMappingInterface::setFrom() */ - public function setLookupColumn($string) + public function setLookupColumn($string) : LookupMapping { - $this->setLookupExpression(ExpressionFactory::createFromString($this->getWorkbench(), $string, $this->getMapper()->getFromMetaObject())); + $expr = ExpressionFactory::createFromString($this->getWorkbench(), $string, $this->getLookupObject()); + $this->setLookupExpression($expr); return $this; } + + public function getLookupObject() : MetaObjectInterface|null + { + return $this->lookupObject ?? $this->getMapper()->getFromMetaObject(); + } /** + * @uxon-property lookup_object_alias + * @uxon-type metamodel:object * - * {@inheritDoc} - * @see \exface\Core\Interfaces\DataSheets\LookupMappingInterface::getToExpression() + * @param string $value + * @return $this */ - public function getToExpression() + public function setLookupObjectAlias(string $value) : LookupMapping + { + return $this->setLookupMetaObject($this->getWorkbench()->model()->getObject($value)); + } + + public function setLookupMetaObject(MetaObjectInterface $object) : LookupMapping + { + $this->lookupObject = $object; + return $this; + } + + public function getToExpression() : ExpressionInterface { return $this->toExpression; } - /** - * - * {@inheritDoc} - * @see \exface\Core\Interfaces\DataSheets\LookupMappingInterface::setToExpression() - */ - public function setToExpression(ExpressionInterface $expression) + public function setToExpression(ExpressionInterface $expression) : LookupMapping { if ($expression->isReference()){ throw new DataMappingConfigurationError($this, 'Cannot use widget links as expressions in data mappers!'); @@ -108,50 +193,22 @@ public function setToExpression(ExpressionInterface $expression) $this->toExpression = $expression; return $this; } - + /** * This is the expression where the lookup values are going to be placed to - * + * * @uxon-property to * @uxon-type metamodel:expression - * - * {@inheritDoc} + * * @see \exface\Core\Interfaces\DataSheets\DataMappingInterface::setTo() */ - public function setTo($string) + public function setTo($string) : DataMappingInterface { - $this->setToExpression(ExpressionFactory::createFromString($this->getWorkbench(), $string, $this->getMapper()->getToMetaObject())); + $expr = ExpressionFactory::createFromString($this->getWorkbench(), $string, $this->getMapper()->getToMetaObject()); + $this->setToExpression($expr); return $this; } - - /** - * - * {@inheritDoc} - * @see \exface\Core\Interfaces\DataSheets\DataMappingInterface::map() - */ - public function map(DataSheetInterface $fromSheet, DataSheetInterface $toSheet, LogBookInterface $logbook = null) - { - $fromExpr = $this->getLookupExpression(); - $toExpr = $this->getToExpression(); - - $log = "Lookup `{$fromExpr->__toString()}` -> `{$toExpr->__toString()}`."; - $lookupSheet = DataSheetFactory::createFromObjectIdOrAlias($this->getWorkbench(), $this->getLookupObjectAlias()); - $lookupSheet->getColumns()->addFromExpression($fromExpr); - $lookupSheet->getFilters()->addConditionFromString(/* TODO */); - $lookupSheet->dataRead(); - foreach ($lookupSheet->getRows() as $lookupRow) { - /* - Find matching row in to-sheet and add the looked up value into that row - How to find the row??? - */ - } - - if ($logbook !== null) $logbook->addLine($log); - - return $toSheet; - } - /** * * @return bool @@ -160,9 +217,9 @@ public function getCreateRowInEmptyData() : bool { return $this->createRowInEmptyData; } - + /** - * Set to FALSE to prevent static expressions and formulas from adding rows to empty data sheets. + * Set FALSE to prevent static expressions and formulas from adding rows to empty data sheets. * * A static from-expression like `=Today()` applied to an empty to-sheet will normally * add a new row with the generated value. This option can explicitly disable this behavior @@ -183,30 +240,7 @@ public function setCreateRowInEmptyData(bool $value) : LookupMapping protected function setMatches(UxonObject $uxon) : LookupMapping { - $this->matchesUxon = $uxon; + $this->requiredMatchesUxon = $uxon; return $this; } - - /** - * Returns an array of matches - each providing pairs of expressions in the from-sheet and in the lookup-sheet - * @return void - */ - protected function getMatches() : array - { - - } - - /** - * - * {@inheritDoc} - * @see \exface\Core\Interfaces\DataSheets\DataMappingInterface::getRequiredExpressions() - */ - public function getRequiredExpressions(DataSheetInterface $dataSheet) : array - { - $expressions = []; - foreach ($this->getMatches() as $match) { - $expressions[] = $match->getFromExpression(); - } - return $expressions; - } } \ No newline at end of file From e4e66275b0de4fd1b533cc6d8a09049f2ab0854e Mon Sep 17 00:00:00 2001 From: hail-cookies <81558994+hail-cookies@users.noreply.github.com> Date: Tue, 1 Apr 2025 17:05:23 +0200 Subject: [PATCH 2/7] DEV LookupMapping first draft --- .../DataSheets/Mappings/LookupMapping.php | 64 +++++++++++++++---- 1 file changed, 53 insertions(+), 11 deletions(-) diff --git a/CommonLogic/DataSheets/Mappings/LookupMapping.php b/CommonLogic/DataSheets/Mappings/LookupMapping.php index 09ba3c39b..6313fafd0 100644 --- a/CommonLogic/DataSheets/Mappings/LookupMapping.php +++ b/CommonLogic/DataSheets/Mappings/LookupMapping.php @@ -2,6 +2,8 @@ namespace exface\Core\CommonLogic\DataSheets\Mappings; use exface\Core\CommonLogic\UxonObject; +use exface\Core\Exceptions\Behaviors\BehaviorConfigurationError; +use exface\Core\Exceptions\DataSheets\DataMapperConfigurationError; use exface\Core\Factories\DataSheetFactory; use exface\Core\Factories\ExpressionFactory; use exface\Core\Interfaces\DataSheets\DataMappingInterface; @@ -64,26 +66,60 @@ public function map(DataSheetInterface $fromSheet, DataSheetInterface $toSheet, $log = "Lookup `{$lookupExpr->__toString()}` -> `{$toExpr->__toString()}`."; $lookupSheet = DataSheetFactory::createFromObjectIdOrAlias($this->getWorkbench(), $this->getLookupObject()); - $lookupSheet->getColumns()->addFromExpression($lookupExpr); + $lookupColumns = $lookupSheet->getColumns(); + $lookupColumns->addFromExpression($lookupExpr); + $requiredMatches = $this->getRequiredMatches(); - $fromColumns = $fromSheet->getColumns(); - $lookupFilters = $lookupSheet->getFilters(); - - foreach ($this->getRequiredMatches() as $match) { - $fromColumns->addFromExpression($match['lookup']); + foreach ($requiredMatches as $match) { + $lookupColumns->addFromExpression($match['lookup']); // TODO pre-filter to improve performance? } - + $lookupSheet->dataRead(); - - foreach ($lookupSheet->getRows() as $lookupRow) { + $rowsToMatch = $lookupSheet->getRows(); + + foreach ($toSheet->getRows() as $rowNr => $toRow) { + $matchData = []; + foreach ($requiredMatches as $matchAliases) { + $matchData[$matchAliases['lookup']] = $toRow[$matchAliases['to']]; + } + $matchingRows = $this->findMatchingRows($matchData, $rowsToMatch); + if(count($matchingRows) === 1) { + // TODO This is probably not how expressions are used... + $toSheet->setCellValue($toExpr->getAttribute()->getAlias(), $rowNr, $matchingRows[0][$lookupExpr->getAttribute()->getAlias()]); + } else { + // TODO Multiple matches + } } $logbook?->addLine($log); return $toSheet; } + + protected function findMatchingRows(array $matchData, array $rowsToCheck) : array + { + $result = []; + + foreach ($rowsToCheck as $rowToCheck) { + $valid = true; + + foreach ($matchData as $alias => $value) { + if( !key_exists($alias, $rowToCheck) || + $value !== $rowToCheck[$alias]) { + $valid = false; + break; + } + } + + if($valid) { + $result[] = $rowToCheck; + } + } + + return $result; + } /** * Returns an array of required matches - each providing pairs of expressions in the from-sheet and in the @@ -103,12 +139,14 @@ protected function getRequiredMatches() : array $result = []; $fromObject = $this->getMapper()->getFromMetaObject(); $lookupObject = $this->getLookupObject(); + $toObject = $this->getMapper()->getToMetaObject(); $workBench = $this->getWorkbench(); foreach ($this->requiredMatchesUxon as $match) { $result[] = [ 'from' => ExpressionFactory::createFromString($workBench, ($match['from']), $fromObject), - 'lookup' => ExpressionFactory::createFromString($workBench, $match['lookup'], $lookupObject) + 'lookup' => ExpressionFactory::createFromString($workBench, $match['lookup'], $lookupObject), + 'to' => ExpressionFactory::createFromString($workBench, $match['to'], $toObject), ]; } @@ -159,7 +197,11 @@ public function setLookupColumn($string) : LookupMapping public function getLookupObject() : MetaObjectInterface|null { - return $this->lookupObject ?? $this->getMapper()->getFromMetaObject(); + if(empty($this->lookupObject)) { + throw new DataMappingConfigurationError($this, 'Missing value for "lookup_object_alias"!'); + } + + return $this->lookupObject; } /** From 476e10b4f8a8ecfca9fe15ddaf12a09b5e46b0dd Mon Sep 17 00:00:00 2001 From: hail-cookies <81558994+hail-cookies@users.noreply.github.com> Date: Tue, 1 Apr 2025 17:06:41 +0200 Subject: [PATCH 3/7] FIX LookupMapping removed unnecessary using --- CommonLogic/DataSheets/Mappings/LookupMapping.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/CommonLogic/DataSheets/Mappings/LookupMapping.php b/CommonLogic/DataSheets/Mappings/LookupMapping.php index 6313fafd0..f0bcb8463 100644 --- a/CommonLogic/DataSheets/Mappings/LookupMapping.php +++ b/CommonLogic/DataSheets/Mappings/LookupMapping.php @@ -2,8 +2,6 @@ namespace exface\Core\CommonLogic\DataSheets\Mappings; use exface\Core\CommonLogic\UxonObject; -use exface\Core\Exceptions\Behaviors\BehaviorConfigurationError; -use exface\Core\Exceptions\DataSheets\DataMapperConfigurationError; use exface\Core\Factories\DataSheetFactory; use exface\Core\Factories\ExpressionFactory; use exface\Core\Interfaces\DataSheets\DataMappingInterface; From 6c5da8b06e5eee9c2a376183bec2010e1ebbac6b Mon Sep 17 00:00:00 2001 From: hail-cookies <81558994+hail-cookies@users.noreply.github.com> Date: Tue, 1 Apr 2025 17:23:28 +0200 Subject: [PATCH 4/7] DEV LookupMapping cleanup --- CommonLogic/DataSheets/Mappings/LookupMapping.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/CommonLogic/DataSheets/Mappings/LookupMapping.php b/CommonLogic/DataSheets/Mappings/LookupMapping.php index f0bcb8463..5221276eb 100644 --- a/CommonLogic/DataSheets/Mappings/LookupMapping.php +++ b/CommonLogic/DataSheets/Mappings/LookupMapping.php @@ -135,14 +135,13 @@ protected function getRequiredMatches() : array } $result = []; - $fromObject = $this->getMapper()->getFromMetaObject(); + $lookupObject = $this->getLookupObject(); $toObject = $this->getMapper()->getToMetaObject(); $workBench = $this->getWorkbench(); - + foreach ($this->requiredMatchesUxon as $match) { $result[] = [ - 'from' => ExpressionFactory::createFromString($workBench, ($match['from']), $fromObject), 'lookup' => ExpressionFactory::createFromString($workBench, $match['lookup'], $lookupObject), 'to' => ExpressionFactory::createFromString($workBench, $match['to'], $toObject), ]; @@ -161,7 +160,7 @@ public function getRequiredExpressions(DataSheetInterface $dataSheet) : array { $expressions = []; foreach ($this->getRequiredMatches() as $match) { - $expressions[] = $match['from']; + $expressions[] = $match['to']; } return $expressions; } @@ -183,10 +182,10 @@ public function setLookupExpression(ExpressionInterface $expression) : LookupMap /** * The attribute (or formula) to look up in the lookup-object and place into the to-column * - * @uxon-property lookup + * @uxon-property lookup_output * @uxon-type metamodel:expression */ - public function setLookupColumn($string) : LookupMapping + public function setLookupOutput($string) : LookupMapping { $expr = ExpressionFactory::createFromString($this->getWorkbench(), $string, $this->getLookupObject()); $this->setLookupExpression($expr); From bc23e0e16bbe210e0133eefe31908fddefa81078 Mon Sep 17 00:00:00 2001 From: hail-cookies <81558994+hail-cookies@users.noreply.github.com> Date: Tue, 1 Apr 2025 18:05:24 +0200 Subject: [PATCH 5/7] REF LookupMapping --- CommonLogic/DataSheets/Mappings/LookupMapping.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CommonLogic/DataSheets/Mappings/LookupMapping.php b/CommonLogic/DataSheets/Mappings/LookupMapping.php index 5221276eb..cfa963bea 100644 --- a/CommonLogic/DataSheets/Mappings/LookupMapping.php +++ b/CommonLogic/DataSheets/Mappings/LookupMapping.php @@ -277,7 +277,7 @@ public function setCreateRowInEmptyData(bool $value) : LookupMapping return $this; } - protected function setMatches(UxonObject $uxon) : LookupMapping + protected function setMatch(UxonObject $uxon) : LookupMapping { $this->requiredMatchesUxon = $uxon; return $this; From fabf6291781312ac81ebc8a0158f1dd99138fcbe Mon Sep 17 00:00:00 2001 From: hail-cookies <81558994+hail-cookies@users.noreply.github.com> Date: Wed, 2 Apr 2025 09:28:03 +0200 Subject: [PATCH 6/7] REF LookupMapping --- CommonLogic/DataSheets/Mappings/LookupMapping.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/CommonLogic/DataSheets/Mappings/LookupMapping.php b/CommonLogic/DataSheets/Mappings/LookupMapping.php index cfa963bea..9170cda2b 100644 --- a/CommonLogic/DataSheets/Mappings/LookupMapping.php +++ b/CommonLogic/DataSheets/Mappings/LookupMapping.php @@ -137,16 +137,18 @@ protected function getRequiredMatches() : array $result = []; $lookupObject = $this->getLookupObject(); + $fromObject = $this->getMapper()->getFromMetaObject(); $toObject = $this->getMapper()->getToMetaObject(); $workBench = $this->getWorkbench(); foreach ($this->requiredMatchesUxon as $match) { $result[] = [ - 'lookup' => ExpressionFactory::createFromString($workBench, $match['lookup'], $lookupObject), - 'to' => ExpressionFactory::createFromString($workBench, $match['to'], $toObject), + 'lookup' => ExpressionFactory::createFromString($workBench, $match->getProperty('lookup'), $lookupObject), + 'from' => ExpressionFactory::CreateFromString($workBench, $match->getProperty('fromAndTo'), $fromObject), + 'to' => ExpressionFactory::createFromString($workBench, $match->getProperty('fromAndTo'), $toObject), ]; } - + $this->requiredMatchesCached = $result; return $result; } @@ -160,7 +162,7 @@ public function getRequiredExpressions(DataSheetInterface $dataSheet) : array { $expressions = []; foreach ($this->getRequiredMatches() as $match) { - $expressions[] = $match['to']; + $expressions[] = $match['from']; } return $expressions; } From f1e8b0add07ab2abce436fea002a267ef5245878 Mon Sep 17 00:00:00 2001 From: hail-cookies <81558994+hail-cookies@users.noreply.github.com> Date: Wed, 17 Sep 2025 18:35:23 +0200 Subject: [PATCH 7/7] DEV LookupMapping made some getters public --- CommonLogic/DataSheets/Mappings/LookupMapping.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CommonLogic/DataSheets/Mappings/LookupMapping.php b/CommonLogic/DataSheets/Mappings/LookupMapping.php index 791a93924..af01d22b1 100644 --- a/CommonLogic/DataSheets/Mappings/LookupMapping.php +++ b/CommonLogic/DataSheets/Mappings/LookupMapping.php @@ -163,7 +163,7 @@ protected function setLookupColumn($string) : LookupMapping * {@inheritDoc} * @see \exface\Core\Interfaces\DataSheets\LookupMappingInterface::getToExpression() */ - protected function getToExpression() : ExpressionInterface + public function getToExpression() : ExpressionInterface { return $this->toExpression; } @@ -579,7 +579,7 @@ protected function setMatches(UxonObject $uxon) : LookupMapping * Returns an array of matches - each providing pairs of expressions in the from-sheet and in the lookup-sheet * @return void */ - protected function getMatches() : array + public function getMatches() : array { if ($this->matchesUxon === null) { return [];