omgdef\multilingual\MultilingualBehavior::afterUpdate PHP Method

afterUpdate() public method

Handle 'afterUpdate' event of the owner.
public afterUpdate ( )
    public function afterUpdate()
    {
        /** @var ActiveRecord $owner */
        $owner = $this->owner;
        if ($owner->isRelationPopulated('translations')) {
            $translations = $this->indexByLanguage($owner->getRelatedRecords()['translations']);
            $this->saveTranslations($translations);
        }
    }