Skip to content

Commit

Permalink
fix definition interpreter
Browse files Browse the repository at this point in the history
  • Loading branch information
dpfaffenbauer committed May 27, 2024
1 parent b25348a commit 4456ab7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,6 @@ web
public
docker-compose.yaml
test-commands.txt
.docker
.docker
cache
config/pimcore/data-definitions
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function __construct(RepositoryInterface $definitionRepository, ImporterI
}

public function interpret(InterpreterContextInterface $context): mixed {
$subDefinition = $this->definitionRepository->find((string)($context->getConfiguration()['definition']));
$subDefinition = $this->definitionRepository->find($context->getConfiguration()['definition']);

if (!$subDefinition instanceof ImportDefinitionInterface) {
return null;
Expand Down
2 changes: 1 addition & 1 deletion src/DataDefinitionsBundle/Model/ExportDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class ExportDefinition extends AbstractDataDefinition implements ExportDefinitio
*/
public $fetchUnpublished = false;

public static function getById(string $name)
public static function getById(int $name)
{
return static::getByName($name);
}
Expand Down
2 changes: 1 addition & 1 deletion src/DataDefinitionsBundle/Model/ImportDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class ImportDefinition extends AbstractDataDefinition implements ImportDefinitio
*/
public $persister;

public static function getById(string $name)
public static function getById(int $name)
{
return static::getByName($name);
}
Expand Down

0 comments on commit 4456ab7

Please sign in to comment.