ListBuilderInterface.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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\Builder;
  11. use Sonata\AdminBundle\Admin\AdminInterface;
  12. use Sonata\AdminBundle\Admin\FieldDescriptionCollection;
  13. use Sonata\AdminBundle\Admin\FieldDescriptionInterface;
  14. /**
  15. * Interface ListBuilderInterface.
  16. *
  17. * @author Thomas Rabaix <thomas.rabaix@sonata-project.org>
  18. */
  19. interface ListBuilderInterface extends BuilderInterface
  20. {
  21. /**
  22. * @param array $options
  23. *
  24. * @return FieldDescriptionCollection
  25. */
  26. public function getBaseList(array $options = array());
  27. /**
  28. * Modify a field description to display it in the list view.
  29. *
  30. * @param null|mixed $type
  31. * @param FieldDescriptionInterface $fieldDescription
  32. * @param AdminInterface $admin
  33. */
  34. public function buildField($type, FieldDescriptionInterface $fieldDescription, AdminInterface $admin);
  35. /**
  36. * Modify a field description and add it to the displayed columns.
  37. *
  38. * @param FieldDescriptionCollection $list
  39. * @param null|mixed $type
  40. * @param FieldDescriptionInterface $fieldDescription
  41. * @param AdminInterface $admin
  42. */
  43. public function addField(FieldDescriptionCollection $list, $type, FieldDescriptionInterface $fieldDescription, AdminInterface $admin);
  44. }