Created
February 27, 2014 11:50
-
-
Save kolyadin/9248703 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Выбираем основные новости (большие) | |
{ | |
$dataMapHelper = new DataMapHelper(); | |
$dataMapHelper->setRelationship([ | |
'popcorn\\model\\dataMaps\\NewsPostDataMap' => NewsPostDataMap::WITH_TAGS, | |
'popcorn\\model\\dataMaps\\TagDataMap' => TagDataMap::WITH_ENTITY, | |
'popcorn\\model\\dataMaps\\PersonDataMap' => PersonDataMap::WITH_NONE | |
]); | |
$dataMap = new NewsTagDataMap($dataMapHelper); | |
$onPage = 10; | |
$paginator = [($page - 1) * $onPage, $onPage]; | |
$posts = $dataMap->findByPersonTag($person, $paginator); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment