Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time

Related Entries Generator

The Related Entries Generator creates a listing for related entries.

Create a custom Generator

Just override the build in generator:

news:
    relations:
        NewsBundle\Generator\RelatedEntriesGenerator: AppBundle\Generator\AppRelatedEntriesGenerator

And set up your new class:

<?php

namespace AppBundle\Generator;

use NewsBundle\Model\EntryInterface;
use NewsBundle\Generator\RelatedEntriesGenerator;

class AppRelatedEntriesGenerator extends RelatedEntriesGenerator
{
public function generateRelatedEntries(EntryInterface $news, $params = [])
    {
        $listing = parent::generateRelatedEntries($news, $params);
        return $listing;
    }
}