$getAffectedBanners['categoryID'
] =
$getAffectedBanners['categoryId'
];
$getAffectedBanners['img'
] =
$getAffectedBanners['image'
];
$media =
$this->
getMediaByPath($medias,
$getAffectedBanners['image'
]);
if ($media !== null
) { $media =
$this->legacyStructConverter->
convertMediaStruct($media);
$getAffectedBanners['media'
] =
$media;
} $bannerStatistics =
$this->modelManager->
getRepository(TrackingBanner::
class)->
getOrCreateBannerStatsModel($getAffectedBanners['id'
]);
$bannerStatistics->
increaseViews();
$this->modelManager->
persist($bannerStatistics);
$this->modelManager->
flush($bannerStatistics);
if (!
empty($getAffectedBanners['link'
])) { $query =
[ 'module' => 'frontend',
'controller' => 'tracking',
'action' => 'countBannerClick',
'bannerId' =>
$getAffectedBanners['id'
],
];
$getAffectedBanners['link'
] =
$this->front->
ensureRouter()->
assemble($query);
}