protected function validatePriceRule()
    {
        $id = $this->getUpdatingId();

        if ($id === false) {
            return null;
        }

        $data = $this->price_rule->get($id);

        if (empty($data)) {
            $this->setErrorUnavailable('update', $this->translation->text('Price rule'));
            return false;
        }

        $this->setUpdating($data);
        return true;
    }
protected function validatePriceRule()
    {
        $id = $this->getUpdatingId();

        if ($id === false) {
            return null;
        }

        $data = $this->price_rule->get($id);

        if (empty($data)) {
            $this->setErrorUnavailable('update', $this->translation->text('Price rule'));
            return false;
        }

        $this->setUpdating($data);
        return true;
    }
protected function validatePriceRule ( ) { $ id = $ this -> getUpdatingId ( ) ; if ( $ id === false ) { return null ; } $ data = $ this -> price_rule -> get ( $ id ) ; if ( empty ( $ data ) ) { $ this -> setErrorUnavailable ( 'update' , $ this -> translation -> text ( 'Price rule' ) ) ; return false ; } $ this -> setUpdating ( $ data ) ; return true ; }
Validates a price rule to be updated
@return boolean|null
Validates a price rule to be updated