Skip to content

Instantly share code, notes, and snippets.

@Big-Shark
Last active September 17, 2015 17:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Big-Shark/9afc4b1b14d2aabcfe07 to your computer and use it in GitHub Desktop.
Save Big-Shark/9afc4b1b14d2aabcfe07 to your computer and use it in GitHub Desktop.
demo_propel.php
<?php
$property = PropertyQuery::create()->findByIdWithRelated($request->get('id'));
$medias = $property->getMediasJoinMedia();
$reviews = $property->getReviews(
ReviewQuery::create()
->innerJoinWithAnswer()
->useAnswerQuery()
->innerJoinWithQuestion()
->endUse()
->leftJoinWithBooking()
->useBookingQuery()
->leftJoinWithUser()
->endUse()
->leftJoinWithExternalReview()
->leftJoinWithGuestReview()
->filterByIsModerated(true)
);
$information = $property->getInformation(
PropertyInformationQuery::create()
->innerJoinWithInformation()
->useInformationQuery()
->filterByIsActive(true)
->filterByRequiresBooking(false)
->orderByRank()
->endUse()
->filterByContent('', PropertyInformationQuery::NOT_EQUAL)
->filterByContent(null, PropertyInformationQuery::ISNOTNULL)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment