src/CoreBundle/DcGeneral/PropertyConditionFactory.php
public function createCondition(array $configuration, IMetaModel $metaModel)
    {
        if (!isset($configuration['type'])) {
            throw new \InvalidArgumentException('No type given in configuration');
        }

        if (!$this->factories->has($typeName = $configuration['type'])) {
            if ($result = $this->fallbackFactory->createCondition($configuration, $metaModel)) {
                return $result;
            }

            throw new \InvalidArgumentException('Unknown type: ' . $typeName);
        }

        return $this->getFactory($typeName)->buildCondition($configuration, $metaModel);
    }
public function createCondition(array $configuration, IMetaModel $metaModel)
    {
        if (!isset($configuration['type'])) {
            throw new \InvalidArgumentException('No type given in configuration');
        }

        if (!$this->factories->has($typeName = $configuration['type'])) {
            if ($result = $this->fallbackFactory->createCondition($configuration, $metaModel)) {
                return $result;
            }

            throw new \InvalidArgumentException('Unknown type: ' . $typeName);
        }

        return $this->getFactory($typeName)->buildCondition($configuration, $metaModel);
    }
Create a condition from the passed configuration.

@param array      $configuration The configuration.
@param IMetaModel $metaModel     The MetaModel instance.

@return PropertyConditionInterface

@throws \InvalidArgumentException When the type is unknown.