Skip to content

Commit

Permalink
[Core] Disable page rendering validator
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinDev committed Dec 8, 2021
1 parent 694015b commit 638487e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/core/src/Entity/Page.php
Expand Up @@ -19,6 +19,7 @@
use Pushword\Core\Entity\SharedTrait\TimestampableTrait;
use Pushword\Core\Validator\Constraints\PageRendering;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Validator\Mapping\ClassMetadata;

/**
* @ORM\MappedSuperclass
Expand All @@ -28,7 +29,6 @@
* errorPath="slug",
* message="page.slug.already_used"
* )
* @PageRendering
*/
class Page implements PageInterface
{
Expand All @@ -54,4 +54,10 @@ public function __construct(bool $initDateTimeProperties = true)
$this->publishedAt = new \DateTime();
}
}

public static function loadValidatorMetadata(ClassMetadata $metadata): void
{
// TODO : fix why on admin, it's not throwing exception on submit
//$metadata->addConstraint( new PageRendering());
}
}

0 comments on commit 638487e

Please sign in to comment.