SlugHandlerWithUniqueCallbackInterface.php 847 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace Gedmo\Sluggable\Handler;
  3. use Gedmo\Sluggable\Mapping\Event\SluggableAdapter;
  4. /**
  5. * This adds the ability to a SlugHandler to change the slug just before its
  6. * uniqueness is ensured. It is also called if the unique options is _not_
  7. * set.
  8. *
  9. * @author Gediminas Morkevicius <gediminas.morkevicius@gmail.com>
  10. * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
  11. */
  12. interface SlugHandlerWithUniqueCallbackInterface extends SlugHandlerInterface
  13. {
  14. /**
  15. * Callback for slug handlers before it is made unique
  16. *
  17. * @param SluggableAdapter $ea
  18. * @param array $config
  19. * @param object $object
  20. * @param string $slug
  21. *
  22. * @return void
  23. */
  24. public function beforeMakingUnique(SluggableAdapter $ea, array &$config, $object, &$slug);
  25. }