public function validate(EntityInterface $entity)
    {
        if (!$entity instanceof EmailConfiguration) {
            throw new Exception(
                sprintf('The Entity to validate must be an instance of %s', EmailConfiguration::class)
            );
        }

        $this->validateEmailSender($entity->getEmailSender());
        $this->validateEmailSenderName($entity->getEmailSenderName());
        $this->validateEmailSubjectPrefix($entity->getEmailSubjectPrefix());
        $this->validateEmailBodySignature($entity->getEmailBodySignature());

        $errors = $this->getErrors();

        return empty($errors);
    }
public function validate(EntityInterface $entity)
    {
        if (!$entity instanceof EmailConfiguration) {
            throw new Exception(
                sprintf('The Entity to validate must be an instance of %s', EmailConfiguration::class)
            );
        }

        $this->validateEmailSender($entity->getEmailSender());
        $this->validateEmailSenderName($entity->getEmailSenderName());
        $this->validateEmailSubjectPrefix($entity->getEmailSubjectPrefix());
        $this->validateEmailBodySignature($entity->getEmailBodySignature());

        $errors = $this->getErrors();

        return empty($errors);
    }
public function validate ( EntityInterface $ entity ) { if ( ! $ entity instanceof EmailConfiguration ) { throw new Exception ( sprintf ( 'The Entity to validate must be an instance of %s' , EmailConfiguration :: class ) ) ; } $ this -> validateEmailSender ( $ entity -> getEmailSender ( ) ) ; $ this -> validateEmailSenderName ( $ entity -> getEmailSenderName ( ) ) ; $ this -> validateEmailSubjectPrefix ( $ entity -> getEmailSubjectPrefix ( ) ) ; $ this -> validateEmailBodySignature ( $ entity -> getEmailBodySignature ( ) ) ; $ errors = $ this -> getErrors ( ) ; return empty ( $ errors ) ; }
Validate an EmailConfiguration instance

@param EntityInterface $entity

@return bool

@throws Exception
Validate an EmailConfiguration instance