Ejemplo n.º 1
0
 /**
  * Return the CDN store that this file should be stored into, based on its
  * parent setting, if no parent is found the ContentService default is returned
  */
 public function targetStore()
 {
     if ($this->owner->ParentID) {
         $store = $this->owner->Parent()->getCDNStore();
         return $store;
     }
     return $this->contentService->getDefaultStore();
 }
 /**
  * Get the CDN store that this item should be stored in
  */
 public function getCDNStore()
 {
     if ($this->owner->StoreInCDN) {
         return $this->owner->StoreInCDN;
     }
     if (!$this->owner->ID || $this->owner->ID === "root" || !$this->owner->ParentID) {
         return $this->contentService->getDefaultStore();
     }
     if ($this->owner->ParentID) {
         return $this->owner->Parent()->getCDNStore();
     }
 }