Exemple #1
0
 public static function createListing($listing_type_id)
 {
     $listing_type_sid = SJB_ListingTypeManager::getListingTypeSIDByID($listing_type_id);
     $listing = new SJB_Listing(array(), $listing_type_sid);
     $listing->addUsernameProperty();
     $listing->addListingTypeIDProperty();
     $listing->addActivationDateProperty();
     $listing->addExpirationDateProperty();
     return $listing;
 }
Exemple #2
0
 /**
  * Returns sortable properties by listing
  * @return array
  */
 private function getSortableProperties()
 {
     $emptyListing = new SJB_Listing(array(), $this->listingTypeSID);
     $emptyListing->addPicturesProperty();
     $emptyListing->addIDProperty();
     $emptyListing->addListingTypeIDProperty();
     $emptyListing->addActivationDateProperty();
     $emptyListing->addNumberOfViewsProperty();
     $emptyListing->addApplicationsProperty();
     $emptyListing->addSubuserProperty();
     $emptyListing->addActiveProperty();
     $emptyListing->addExpirationDateProperty(null);
     $sortableProperties = array();
     $propertyList = $emptyListing->getPropertyList();
     foreach ($propertyList as $property) {
         $sortableProperties[$property]['is_sortable'] = true;
     }
     return $sortableProperties;
 }