getConstraintOptions example

$table->setRows($rows);
        $table->setColumnMaxWidth(3, 80);
        $table->render();
    }

    private function getClassConstraintsData(ClassMetadataInterface $classMetadata): iterable
    {
        foreach ($classMetadata->getConstraints() as $constraint) {
            yield [
                'class' => $constraint::class,
                'groups' => $constraint->groups,
                'options' => $this->getConstraintOptions($constraint),
            ];
        }
    }

    private function getConstrainedPropertiesData(ClassMetadataInterface $classMetadata): array
    {
        $data = [];

        foreach ($classMetadata->getConstrainedProperties() as $constrainedProperty) {
            $data[$constrainedProperty] = $this->getPropertyData($classMetadata$constrainedProperty);
        }

        
$table->setRows($rows);
        $table->setColumnMaxWidth(3, 80);
        $table->render();
    }

    private function getClassConstraintsData(ClassMetadataInterface $classMetadata): iterable
    {
        foreach ($classMetadata->getConstraints() as $constraint) {
            yield [
                'class' => $constraint::class,
                'groups' => $constraint->groups,
                'options' => $this->getConstraintOptions($constraint),
            ];
        }
    }

    private function getConstrainedPropertiesData(ClassMetadataInterface $classMetadata): array
    {
        $data = [];

        foreach ($classMetadata->getConstrainedProperties() as $constrainedProperty) {
            $data[$constrainedProperty] = $this->getPropertyData($classMetadata$constrainedProperty);
        }

        
Home | Imprint | This part of the site doesn't use cookies.