protected function validateValueTypePriceRule()
    {
        $field = 'value_type';

        if ($this->isExcluded($field)) {
            return null;
        }

        $value = $this->getSubmitted($field);

        if ($this->isUpdating() && !isset($value)) {
            $this->unsetSubmitted($field);
            return null;
        }

        $types = $this->price_rule->getTypes();

        if (empty($types[$value])) {
            $this->setErrorInvalid($field, $this->translation->text('Value type'));
            return false;
        }

        return true;
    }
protected function validateValueTypePriceRule()
    {
        $field = 'value_type';

        if ($this->isExcluded($field)) {
            return null;
        }

        $value = $this->getSubmitted($field);

        if ($this->isUpdating() && !isset($value)) {
            $this->unsetSubmitted($field);
            return null;
        }

        $types = $this->price_rule->getTypes();

        if (empty($types[$value])) {
            $this->setErrorInvalid($field, $this->translation->text('Value type'));
            return false;
        }

        return true;
    }
protected function validateValueTypePriceRule ( ) { $ field = 'value_type' ; if ( $ this -> isExcluded ( $ field ) ) { return null ; } $ value = $ this -> getSubmitted ( $ field ) ; if ( $ this -> isUpdating ( ) && ! isset ( $ value ) ) { $ this -> unsetSubmitted ( $ field ) ; return null ; } $ types = $ this -> price_rule -> getTypes ( ) ; if ( empty ( $ types [ $ value ] ) ) { $ this -> setErrorInvalid ( $ field , $ this -> translation -> text ( 'Value type' ) ) ; return false ; } return true ; }
Validates a price rule value type
@return boolean|null
Validates a price rule value type