code: private function throwIllegalOperationIfItemIsImmutable(ResourceEventInterface $event)
      {
          if ($event->getHard()) {
              return;
          }
  
          $item = $this->getSaleItemFromEvent($event);
  
          // Stop if item is immutable.
          if ($item->isImmutable()) {
              throw new IllegalOperationException('ekyna_commerce.sale.message.immutable_element');
          }
      }
docs: Throws an illegal operation exception if the item is immutable.
  
  @param ResourceEventInterface $event
  
  @throws IllegalOperationException