/** * 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; }