code: public function delete($varItem)
      {
          // Determine the id.
          if (is_object($varItem) && ($varItem instanceof Model)) {
              $objModelItem = $varItem->getItem();
          } else {
              $objModelItem = $this->getMetaModel()->findById($varItem);
          }
          if ($objModelItem) {
              $this->getMetaModel()->delete($objModelItem);
          }
      }
docs: Delete an item.
  
  The given value may be either integer, string or an instance of Model
  
  @param mixed $varItem Id or the model itself, to delete.
  
  @return void
  
  @throws \RuntimeException When an unusable object has been passed.