AdminExtension.php 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. <?php
  2. /*
  3. * This file is part of the Sonata Project 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 Knp\Menu\ItemInterface as MenuItemInterface;
  12. use Sonata\AdminBundle\Datagrid\DatagridMapper;
  13. use Sonata\AdminBundle\Datagrid\ListMapper;
  14. use Sonata\AdminBundle\Datagrid\ProxyQueryInterface;
  15. use Sonata\AdminBundle\Form\FormMapper;
  16. use Sonata\AdminBundle\Route\RouteCollection;
  17. use Sonata\AdminBundle\Show\ShowMapper;
  18. use Sonata\CoreBundle\Validator\ErrorElement;
  19. /**
  20. * Class AdminExtension.
  21. *
  22. * @author Thomas Rabaix <thomas.rabaix@sonata-project.org>
  23. */
  24. abstract class AdminExtension implements AdminExtensionInterface
  25. {
  26. /**
  27. * {@inheritdoc}
  28. */
  29. public function configureFormFields(FormMapper $form)
  30. {
  31. }
  32. /**
  33. * {@inheritdoc}
  34. */
  35. public function configureListFields(ListMapper $list)
  36. {
  37. }
  38. /**
  39. * {@inheritdoc}
  40. */
  41. public function configureDatagridFilters(DatagridMapper $filter)
  42. {
  43. }
  44. /**
  45. * {@inheritdoc}
  46. */
  47. public function configureShowFields(ShowMapper $show)
  48. {
  49. }
  50. /**
  51. * {@inheritdoc}
  52. */
  53. public function configureRoutes(AdminInterface $admin, RouteCollection $collection)
  54. {
  55. }
  56. /**
  57. * {@inheritdoc}
  58. */
  59. public function configureSideMenu(AdminInterface $admin, MenuItemInterface $menu, $action, AdminInterface $childAdmin = null)
  60. {
  61. }
  62. /**
  63. * {@inheritdoc}
  64. */
  65. public function configureTabMenu(AdminInterface $admin, MenuItemInterface $menu, $action, AdminInterface $childAdmin = null)
  66. {
  67. // Use configureSideMenu not to mess with previous overrides
  68. // TODO remove once deprecation period is over
  69. $this->configureSideMenu($admin, $menu, $action, $childAdmin);
  70. }
  71. /**
  72. * {@inheritdoc}
  73. */
  74. public function validate(AdminInterface $admin, ErrorElement $errorElement, $object)
  75. {
  76. }
  77. /**
  78. * {@inheritdoc}
  79. */
  80. public function configureQuery(AdminInterface $admin, ProxyQueryInterface $query, $context = 'list')
  81. {
  82. }
  83. /**
  84. * {@inheritdoc}
  85. */
  86. public function alterNewInstance(AdminInterface $admin, $object)
  87. {
  88. }
  89. /**
  90. * {@inheritdoc}
  91. */
  92. public function alterObject(AdminInterface $admin, $object)
  93. {
  94. }
  95. /**
  96. * {@inheritdoc}
  97. */
  98. public function getPersistentParameters(AdminInterface $admin)
  99. {
  100. return array();
  101. }
  102. /**
  103. * {@inheritdoc}
  104. */
  105. public function getAccessMapping(AdminInterface $admin)
  106. {
  107. return array();
  108. }
  109. /**
  110. * {@inheritdoc}
  111. */
  112. public function preUpdate(AdminInterface $admin, $object)
  113. {
  114. }
  115. /**
  116. * {@inheritdoc}
  117. */
  118. public function postUpdate(AdminInterface $admin, $object)
  119. {
  120. }
  121. /**
  122. * {@inheritdoc}
  123. */
  124. public function prePersist(AdminInterface $admin, $object)
  125. {
  126. }
  127. /**
  128. * {@inheritdoc}
  129. */
  130. public function postPersist(AdminInterface $admin, $object)
  131. {
  132. }
  133. /**
  134. * {@inheritdoc}
  135. */
  136. public function preRemove(AdminInterface $admin, $object)
  137. {
  138. }
  139. /**
  140. * {@inheritdoc}
  141. */
  142. public function postRemove(AdminInterface $admin, $object)
  143. {
  144. }
  145. }