/** * Whenever we save the content source, we want to disconnect * the repository so that it reconnects with whatever new connection * details are provided * * @see sapphire/core/model/DataObject#onBeforeWrite() */ public function onBeforeWrite() { parent::onBeforeWrite(); $repo = $this->getRemoteRepository(); if ($repo->isConnected()) { $repo->disconnect(); } }
public function onBeforeWrite() { parent::onBeforeWrite(); $this->FolderPath = str_replace('\\', '/', $this->FolderPath); }