public function onAfterWrite() { parent::onAfterWrite(); // Ensure that children loading $this->Parent() load the refreshed record $this->flushCache(); $this->updateChildFilesystem(); }
public function onAfterWrite() { parent::onAfterWrite(); // No publishing UX for folders, so just cascade changes live if (Versioned::get_stage() === Versioned::DRAFT) { $this->copyVersionToStage(Versioned::DRAFT, Versioned::LIVE); } // Update draft version of all child records $this->updateChildFilesystem(); }