public function isValid($value)
    {
        if (!$value instanceof ApplicationInterface) {
            $this->error('NO_APPLICATION');

            return false;
        }

        $error = false;

        if ('' == $value->getContact()->getEmail()) {
            $error = true;
            $this->error('NO_EMAIL');
        }

        if (!$value->getAttributes()->getAcceptedPrivacyPolicy()) {
            $error = true;
            $this->error('NO_ACCEPT_PP');
        }

        return !$error;
    }
public function isValid($value)
    {
        if (!$value instanceof ApplicationInterface) {
            $this->error('NO_APPLICATION');

            return false;
        }

        $error = false;

        if ('' == $value->getContact()->getEmail()) {
            $error = true;
            $this->error('NO_EMAIL');
        }

        if (!$value->getAttributes()->getAcceptedPrivacyPolicy()) {
            $error = true;
            $this->error('NO_ACCEPT_PP');
        }

        return !$error;
    }
public function isValid ( $ value ) { if ( ! $ value instanceof ApplicationInterface ) { $ this -> error ( 'NO_APPLICATION' ) ; return false ; } $ error = false ; if ( '' == $ value -> getContact ( ) -> getEmail ( ) ) { $ error = true ; $ this -> error ( 'NO_EMAIL' ) ; } if ( ! $ value -> getAttributes ( ) -> getAcceptedPrivacyPolicy ( ) ) { $ error = true ; $ this -> error ( 'NO_ACCEPT_PP' ) ; } return ! $ error ; }
Returns true, if and only if there's at least an email address set and the privacy policy accepted in the application.

{@inheritDoc}

@param ApplicationInterface $value
Returns true if and only if there s at least an email address set and the privacy policy accepted in the application .