Ejemplo n.º 1
0
 /**
  * @param EContentRecord $eContentRecord
  * @return array
  */
 public function getScopedAvailability($eContentRecord)
 {
     $availability = array();
     $availability['mine'] = $eContentRecord->getAvailability();
     $availability['other'] = array();
     $scopingId = $this->getLibraryScopingId();
     if ($scopingId != -1) {
         foreach ($availability['mine'] as $key => $availabilityItem) {
             if ($availabilityItem->libraryId != -1 && $availabilityItem->libraryId != $scopingId) {
                 $availability['other'][$key] = $availability['mine'][$key];
                 unset($availability['mine'][$key]);
             }
         }
     }
     return $availability;
 }