DatagridInterface.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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. */
  11. namespace Sonata\AdminBundle\Datagrid;
  12. use Sonata\AdminBundle\Filter\FilterInterface;
  13. interface DatagridInterface
  14. {
  15. /**
  16. * @abstract
  17. * @return \Sonata\AdminBundle\Datagrid\PagerInterface
  18. */
  19. function getPager();
  20. /**
  21. * @abstract
  22. * @return \Sonata\AdminBundle\Datagrid\ProxyQueryInterface
  23. */
  24. function getQuery();
  25. /**
  26. * @abstract
  27. * @return array
  28. */
  29. function getResults();
  30. /**
  31. * @abstract
  32. * @return void
  33. */
  34. function buildPager();
  35. /**
  36. * @abstract
  37. * @param \Sonata\AdminBundle\Filter\FilterInterface $filter
  38. * @return \Sonata\AdminBundle\Filter\FilterInterface
  39. */
  40. function addFilter(FilterInterface $filter);
  41. /**
  42. * @abstract
  43. * @return array
  44. */
  45. function getFilters();
  46. /**
  47. * @abstract
  48. * @return array
  49. */
  50. function getValues();
  51. /**
  52. * @abstract
  53. * @return array
  54. */
  55. function getColumns();
  56. /**
  57. * @abstract
  58. * @param $name
  59. * @param $operator
  60. * @param $value
  61. */
  62. function setValue($name, $operator, $value);
  63. /**
  64. * @abstract
  65. * @return \Symfony\Component\Form\Form
  66. */
  67. function getForm();
  68. /**
  69. * @abstract
  70. * @param $name
  71. * @return \Sonata\AdminBundle\Filter\FilterInterface
  72. */
  73. function getFilter($name);
  74. /**
  75. * @abstract
  76. * @param $name
  77. * @return bool
  78. */
  79. function hasFilter($name);
  80. /**
  81. * @abstract
  82. * @param $name
  83. */
  84. function removeFilter($name);
  85. }