ListBuilderInterface.php 1.5 KB

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