public function onParseArticles(FrontendTemplate $template, array $data, Module $module)
    {
        /** @var NewsCategoryModel $newsCategoryModelAdapter */
        $newsCategoryModelAdapter = $this->framework->getAdapter(NewsCategoryModel::class);

        if (null === ($models = $newsCategoryModelAdapter->findPublishedByNews($data['id']))) {
            return;
        }

        $this->addCategoriesToTemplate($template, $module, $models);
    }
public function onParseArticles(FrontendTemplate $template, array $data, Module $module)
    {
        /** @var NewsCategoryModel $newsCategoryModelAdapter */
        $newsCategoryModelAdapter = $this->framework->getAdapter(NewsCategoryModel::class);

        if (null === ($models = $newsCategoryModelAdapter->findPublishedByNews($data['id']))) {
            return;
        }

        $this->addCategoriesToTemplate($template, $module, $models);
    }
public function onParseArticles ( FrontendTemplate $ template , array $ data , Module $ module ) { /** @var NewsCategoryModel $newsCategoryModelAdapter */ $ newsCategoryModelAdapter = $ this -> framework -> getAdapter ( NewsCategoryModel :: class ) ; if ( null === ( $ models = $ newsCategoryModelAdapter -> findPublishedByNews ( $ data [ 'id' ] ) ) ) { return ; } $ this -> addCategoriesToTemplate ( $ template , $ module , $ models ) ; }
On parse the articles.

@param FrontendTemplate $template
@param array            $data
@param Module           $module
On parse the articles .