Neos\Flow\Property\PropertyMappingConfiguration::allowAllPropertiesExcept PHP Method

allowAllPropertiesExcept() public method

Example: allowAllPropertiesExcept('password', 'userGroup')
public allowAllPropertiesExcept ( ) : PropertyMappingConfiguration
return PropertyMappingConfiguration this
    public function allowAllPropertiesExcept()
    {
        $this->mapUnknownProperties = true;
        foreach (func_get_args() as $propertyName) {
            $this->propertiesNotToBeMapped[$propertyName] = $propertyName;
        }
        return $this;
    }

Usage Example

 /**
  * @test
  * @covers \Neos\Flow\Property\PropertyMappingConfiguration::shouldMap
  */
 public function shouldMapReturnsFalseForBlacklistedProperties()
 {
     $this->propertyMappingConfiguration->allowAllPropertiesExcept('someSourceProperty', 'someOtherProperty');
     $this->assertFalse($this->propertyMappingConfiguration->shouldMap('someSourceProperty'));
     $this->assertFalse($this->propertyMappingConfiguration->shouldMap('someOtherProperty'));
     $this->assertTrue($this->propertyMappingConfiguration->shouldMap('someOtherPropertyWhichHasNotBeenConfigured'));
 }