- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
function executeNewsRightRelated(sfWebRequest $request)
{
$siteId = $request->getParameter('site')->id;
$tNewsList = $this->object->News;
$newsList = array();
foreach ($tNewsList as $news) {
$ids = array();
foreach ($news->Sites as $idModel) {
$ids[] = $idModel->id;
}
if (in_array($siteId, $ids)) {
$newsList[] = $news;
}
}
$this->newsList = $newsList;
}