, , - i18n.
, , i18n symfony $record- > Translation, symfony - _set, (Subject) recordTranslation.
, saveEmbeddedForms (SubjectForm), i18n , , , , - , postSave .
public $already_saved;
public function doSave($con = null) {
$this->already_saved = $this->object->isModified();
parent::doSave($con);
}
public function saveEmbeddedForms($con = null,$forms = null){
if (null === $con)
$con = $this->getConnection();
if (null === $forms)
$forms = $this->embeddedForms;
foreach($forms as $form) {
if ( count($form->object->isModified()) != 0){
$mark_for_save = true;
break;
}
}
parent::saveEmbeddedForms($con, $forms);
if (@$mark_for_save && !$this->already_saved) {
$this->object->postSave();
}
}