src/EventListener/DcGeneral/Table/FilterSetting/AbstractAbstainingListener.php
protected function isAllowedContext($dataDefinition, $propertyName, $model)
    {
        // Check the name of the data def.
        if ('tl_metamodel_filtersetting' !== $dataDefinition->getName()) {
            return false;
        }

        // Check the name of the property.
        if ('attr_id2' !== $propertyName) {
            return false;
        }

        // Check the type.
        $property = $model->getProperty('type');
        return !('range' !== $property && 'rangedate' !== $property);
    }
protected function isAllowedContext($dataDefinition, $propertyName, $model)
    {
        // Check the name of the data def.
        if ('tl_metamodel_filtersetting' !== $dataDefinition->getName()) {
            return false;
        }

        // Check the name of the property.
        if ('attr_id2' !== $propertyName) {
            return false;
        }

        // Check the type.
        $property = $model->getProperty('type');
        return !('range' !== $property && 'rangedate' !== $property);
    }
protected function isAllowedContext ( $ dataDefinition , $ propertyName , $ model ) { // Check the name of the data def. if ( 'tl_metamodel_filtersetting' !== $ dataDefinition -> getName ( ) ) { return false ; } // Check the name of the property. if ( 'attr_id2' !== $ propertyName ) { return false ; } // Check the type. $ property = $ model -> getProperty ( 'type' ) ; return ! ( 'range' !== $ property && 'rangedate' !== $ property ) ; }
Check if the context of the event is a allowed one.

@param ContainerInterface $dataDefinition The data definition from the environment.

@param string             $propertyName   The current property name.

@param ModelInterface     $model          The current model.

@return bool True => It is a allowed one | False => nope
Check if the context of the event is a allowed one .