src/CoreBundle/DcGeneral/FallbackPropertyConditionFactory.php
public function createCondition(array $configuration, IMetaModel $metaModel)
    {
        $event = new CreatePropertyConditionEvent($configuration, $metaModel);
        $this->dispatcher->dispatch(CreatePropertyConditionEvent::NAME, $event);

        if (null === $instance = $event->getInstance()) {
            throw new \RuntimeException(sprintf(
                'Condition of type %s could not be transformed to an instance.',
                $configuration['type']
            ));
        }

        // @codingStandardsIgnoreStart Silencing errors is discouraged
        @trigger_error('Creating input screen conditions via event is deprecated. ' .
            'Please implement a valid condition factory.', E_USER_DEPRECATED);
        // @codingStandardsIgnoreEnd

        return $instance;
    }
public function createCondition(array $configuration, IMetaModel $metaModel)
    {
        $event = new CreatePropertyConditionEvent($configuration, $metaModel);
        $this->dispatcher->dispatch(CreatePropertyConditionEvent::NAME, $event);

        if (null === $instance = $event->getInstance()) {
            throw new \RuntimeException(sprintf(
                'Condition of type %s could not be transformed to an instance.',
                $configuration['type']
            ));
        }

        // @codingStandardsIgnoreStart Silencing errors is discouraged
        @trigger_error('Creating input screen conditions via event is deprecated. ' .
            'Please implement a valid condition factory.', E_USER_DEPRECATED);
        // @codingStandardsIgnoreEnd

        return $instance;
    }
public function createCondition ( array $ configuration , IMetaModel $ metaModel ) { $ event = new CreatePropertyConditionEvent ( $ configuration , $ metaModel ) ; $ this -> dispatcher -> dispatch ( CreatePropertyConditionEvent :: NAME , $ event ) ; if ( null === $ instance = $ event -> getInstance ( ) ) { throw new \ RuntimeException ( sprintf ( 'Condition of type %s could not be transformed to an instance.' , $ configuration [ 'type' ] ) ) ; } // @codingStandardsIgnoreStart Silencing errors is discouraged @ trigger_error ( 'Creating input screen conditions via event is deprecated. ' . 'Please implement a valid condition factory.' , E_USER_DEPRECATED ) ; // @codingStandardsIgnoreEnd return $ instance ; }
Create a condition from the passed configuration.

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

@return PropertyConditionInterface

@throws \RuntimeException When the condition could not be transformed.
Create a condition from the passed configuration .