src/CoreBundle/EventListener/DcGeneral/DefinitionBuilder/AbstractConditionBuilder.php
public static function calculateConditions(IMetaModelDataDefinition $container, array $inputScreen)
    {
        if ($container->hasDefinition(ModelRelationshipDefinitionInterface::NAME)) {
            $definition = $container->getDefinition(ModelRelationshipDefinitionInterface::NAME);
        } else {
            $definition = new DefaultModelRelationshipDefinition();

            $container->setDefinition(ModelRelationshipDefinitionInterface::NAME, $definition);
        }

        if (!$definition instanceof ModelRelationshipDefinitionInterface) {
            throw new \InvalidArgumentException('Search element does not implement the correct interface.');
        }

        $instance = new static();

        $instance->container   = $container;
        $instance->inputScreen = $inputScreen;
        $instance->definition  = $definition;
        $instance->calculate();
    }
public static function calculateConditions(IMetaModelDataDefinition $container, array $inputScreen)
    {
        if ($container->hasDefinition(ModelRelationshipDefinitionInterface::NAME)) {
            $definition = $container->getDefinition(ModelRelationshipDefinitionInterface::NAME);
        } else {
            $definition = new DefaultModelRelationshipDefinition();

            $container->setDefinition(ModelRelationshipDefinitionInterface::NAME, $definition);
        }

        if (!$definition instanceof ModelRelationshipDefinitionInterface) {
            throw new \InvalidArgumentException('Search element does not implement the correct interface.');
        }

        $instance = new static();

        $instance->container   = $container;
        $instance->inputScreen = $inputScreen;
        $instance->definition  = $definition;
        $instance->calculate();
    }
Parse the correct conditions.

@param IMetaModelDataDefinition $container   The data container.
@param array                    $inputScreen The input screen.

@return void

@throws \InvalidArgumentException When the stored definition does not implement the correct interface.