AdminExtension.php 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <?php
  2. /*
  3. * This file is part of the Sonata package.
  4. *
  5. * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Sonata\AdminBundle\Admin;
  11. use Sonata\AdminBundle\Form\FormMapper;
  12. use Sonata\AdminBundle\Datagrid\ListMapper;
  13. use Sonata\AdminBundle\Datagrid\DatagridMapper;
  14. use Sonata\AdminBundle\Show\ShowMapper;
  15. use Sonata\AdminBundle\Route\RouteCollection;
  16. use Sonata\AdminBundle\Validator\ErrorElement;
  17. use Sonata\AdminBundle\Admin\AdminInterface;
  18. use Sonata\AdminBundle\Datagrid\ProxyQueryInterface;
  19. use Knp\Menu\ItemInterface as MenuItemInterface;
  20. abstract class AdminExtension implements AdminExtensionInterface
  21. {
  22. /**
  23. * {@inheritdoc}
  24. */
  25. public function configureFormFields(FormMapper $form)
  26. {}
  27. /**
  28. * {@inheritdoc}
  29. */
  30. public function configureListFields(ListMapper $list)
  31. {}
  32. /**
  33. * {@inheritdoc}
  34. */
  35. public function configureDatagridFilters(DatagridMapper $filter)
  36. {}
  37. /**
  38. * {@inheritdoc}
  39. */
  40. public function configureShowFields(ShowMapper $filter)
  41. {}
  42. /**
  43. * {@inheritdoc}
  44. */
  45. public function configureRoutes(AdminInterface $admin, RouteCollection $collection)
  46. {}
  47. /**
  48. * {@inheritdoc}
  49. */
  50. public function configureSideMenu(AdminInterface $admin, MenuItemInterface $menu, $action, AdminInterface $childAdmin = null)
  51. {}
  52. /**
  53. * {@inheritdoc}
  54. */
  55. public function validate(AdminInterface $admin, ErrorElement $errorElement, $object)
  56. {}
  57. /**
  58. * {@inheritdoc}
  59. */
  60. public function configureQuery(AdminInterface $admin, ProxyQueryInterface $query, $context = 'list')
  61. {}
  62. /**
  63. * {@inheritdoc}
  64. */
  65. public function alterNewInstance(AdminInterface $admin, $object)
  66. {}
  67. /**
  68. * {@inheritdoc}
  69. */
  70. public function preUpdate(AdminInterface $admin, $object)
  71. {}
  72. /**
  73. * {@inheritdoc}
  74. */
  75. public function postUpdate(AdminInterface $admin, $object)
  76. {}
  77. /**
  78. * {@inheritdoc}
  79. */
  80. public function prePersist(AdminInterface $admin, $object)
  81. {}
  82. /**
  83. * {@inheritdoc}
  84. */
  85. public function postPersist(AdminInterface $admin, $object)
  86. {}
  87. /**
  88. * {@inheritdoc}
  89. */
  90. public function preRemove(AdminInterface $admin, $object)
  91. {}
  92. /**
  93. * {@inheritdoc}
  94. */
  95. public function postRemove(AdminInterface $admin, $object)
  96. {}
  97. }