/**
  * Generate unique license key before each write.
  * 
  * @see DataObject::onBeforeWrite()
  */
 function onBeforeWrite()
 {
     parent::onBeforeWrite();
     if (!$this->isInDB()) {
         $this->LicenceKey = $this->generateLicenceKey();
     }
 }
Example #2
0
 public function onBeforeWrite()
 {
     parent::onBeforeWrite();
     if (!$this->hasFLV()) {
         $this->createFLV();
     }
     if (!$this->getThumbnail()) {
         $this->createThumbnail();
     }
 }
 function onBeforeWrite()
 {
     parent::onBeforeWrite();
     $this->SubsiteID = 0;
 }