PHP Class ApiPlatform\Core\Bridge\Symfony\Validator\Metadata\Property\ValidatorPropertyMetadataFactory

Author: Kévin Dunglas ([email protected])
Inheritance: implements ApiPlatform\Core\Metadata\Property\Factory\PropertyMetadataFactoryInterface
Show file Open project: api-platform/core Class Usage Examples

Public Methods

Method Description
__construct ( Symfony\Component\Validator\Mapping\Factory\MetadataFactoryInterface $validatorMetadataFactory, ApiPlatform\Core\Metadata\Property\Factory\PropertyMetadataFactoryInterface $decorated )
create ( string $resourceClass, string $name, array $options = [] ) : PropertyMetadata

Private Methods

Method Description
isRequired ( Constraint $constraint ) : boolean Is this constraint making the related property required?
isRequiredByGroups ( Symfony\Component\Validator\Mapping\PropertyMetadataInterface $validatorPropertyMetadata, array $options ) : boolean Tests if the property is required because of its validation groups.

Method Details

__construct() public method

public __construct ( Symfony\Component\Validator\Mapping\Factory\MetadataFactoryInterface $validatorMetadataFactory, ApiPlatform\Core\Metadata\Property\Factory\PropertyMetadataFactoryInterface $decorated )
$validatorMetadataFactory Symfony\Component\Validator\Mapping\Factory\MetadataFactoryInterface
$decorated ApiPlatform\Core\Metadata\Property\Factory\PropertyMetadataFactoryInterface

create() public method

public create ( string $resourceClass, string $name, array $options = [] ) : PropertyMetadata
$resourceClass string
$name string
$options array
return ApiPlatform\Core\Metadata\Property\PropertyMetadata