Esempio n. 1
0
 /**
  * Prepare storage profiles array for sorting
  *
  * @param int $partnerId
  */
 protected static function prepareStorageProfilesForSort($partnerId)
 {
     if (!is_null(self::$storageProfilesOrder)) {
         return;
     }
     $criteria = new Criteria();
     $criteria->add(StorageProfilePeer::PARTNER_ID, $partnerId);
     $criteria->add(StorageProfilePeer::DELIVERY_STATUS, StorageProfileDeliveryStatus::BLOCKED, Criteria::NOT_EQUAL);
     $criteria->addAscendingOrderByColumn(StorageProfilePeer::DELIVERY_PRIORITY);
     // Using doSelect instead of doSelectStmt for the ID column so that we can take adavntage of the query cache
     self::$storageProfilesOrder = array();
     $results = StorageProfilePeer::doSelect($criteria);
     foreach ($results as $result) {
         self::$storageProfilesOrder[] = $result->getId();
     }
 }