code: public function afterSave($event)
      {
          foreach ($this->_relatedObjectsFlat as $relatedObject) {
              if (!$relatedObject->save()) {
                  $event->handled = false;
                  $this->owner->addError('_', $relatedObject->objectType->title->upperSingular . ' could not be saved!');
              }
          }
  
          return $event->handled;
      }
docs: [[@doctodo method_description:afterSave]].
  
  @param [[@doctodo param_type:event]] $event [[@doctodo param_description:event]]
  
  @return [[@doctodo return_type:afterSave]] [[@doctodo return_description:afterSave]]