code: private function enterEventAndNotice(string $action, $primaryKeyValue = null) 
      {
          if ($action != 'insert' && $action != 'update') {
              throw new \InvalidArgumentException("Action must be either insert or update");
          }
  
          $actionPastTense = ($action == 'insert') ? 'inserted' : 'updated';
  
          $tableNameSingular = $this->tableMapper->getFormalTableName(false);
          $noteStart = "$actionPastTense $tableNameSingular";
  
          /** use event constant if defined, squelch warning */
          $eventTitle = @constant("EVENT_".strtoupper($tableNameSingular)."_".strtoupper($action)) ?? $noteStart;
          $adminNotification = $noteStart;
          $eventPayload = [];
  
          if (null !== $primaryKeyColumnName = $this->tableMapper->getPrimaryKeyColumnName()) {
              $adminNotification .= " $primaryKeyValue"; // if primary key is set the new id is returned by mapper insert method
              $eventPayload = [$primaryKeyColumnName => $primaryKeyValue];
          }
          
          $eventPayload = array_merge($eventPayload, $this->requestInput);
  
          $this->events->insertInfo($eventTitle, $eventPayload);
          SlimPostgres::setAdminNotice($adminNotification);
      }
docs: called by insert and update