Documentation » Core

8. Serialization »

« 6. Twig Helpers

7. Doctrine base entity manager

The bundle comes with an abstract class for your entities and documents managers:

  • Sonata\CoreBundle\Model\BaseEntityManager
  • Sonata\CoreBundle\Model\BaseDocumentManager
  • Sonata\CoreBundle\Model\BasePHPCRManager

7.1. Use it in your managers

You just have to extend one of the managers:

// src/Entity/ProductManager.php

namespace App\Entity;

use Sonata\CoreBundle\Model\BaseEntityManager;

class ProductManager extends BaseEntityManager
    // ...

Found a typo? Something is wrong in this documentation? Just fork and edit it!