Create manual rankings/top selection bundle

Installs: 323

Dependents: 1

Suggesters: 0

Security: 0


1.0.7 2022-07-07 11:49 UTC

This package is auto-updated.

Last update: 2022-11-07 12:27:34 UTC


A redis driven result cache driver.


Install through composer:

php -d memory_limit=-1 composer.phar require xlabs/topsetbundle

In your AppKernel

public function registerbundles()
    return [
    	new XLabs\TopSetBundle\XLabsTopSetBundle(),


Append to main routing file:

# app/config/routing.yml
    resource: .
    type: xlabs_topset_routing

Configuration sample

Default values are shown below:

# app/config/config.yml
    # for firewall purposes; default is empty
    url_prefix: /members


You can access the top manager tool by using the following routing id:


Check the manager main window; the plug icon will describe how to use it in the project.

Whenever you want an Entity to be reachable from the top manager, just include the following annotation in it:

namespace YourBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use XLabs\TopSetBundle\Annotations as XLabsTopSet;

 * @ORM\Entity
 * ...
 * @XLabsTopSet\Config(routeJSON="<your_routing_id>")
class MyEntity

is the routing ID that will return all rows from that entity in JSON format, where each entry needs to be as follows:

    $entries = array();
    ... get results ...
    ... loop begin ...
        $entries[$row['id']] = array(
            'id' => $row['id'],
            'title' => $row['title'],
            'image' => $row['image']
    ... loop end ...
    return json_encode($entries);

The search in the Top Entries Manager form will be performed on the "title" attribute.