Source of file SyncroDelete.php
Size: 0,567 Bytes - Last Modified: 2021-12-23T10:35:22+00:00
/var/www/docs.ssmods.com/process/src/code/dataobjects/SyncroDelete.php
12345678910111213141516171819202122232425 | <?php /** * Used to capture the deletion of an object * * @author marcus@silverstripe.com.au * @license BSD License http://silverstripe.org/bsd-license/ */ class SyncroDelete extends DataObject { public static $db = array( 'ContentID' => 'Varchar(128)', 'Type' => 'Varchar(128)', 'Deleted' => 'SS_Datetime', ); public static function record_delete($object) { $delete = new SyncroDelete(); $delete->ContentID = $object->ContentID; $delete->Type = $object->ClassName; $delete->Deleted = gmdate('Y-m-d H:i:s'); $delete->write(); } } |