DeleteHandler.php 570 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace ColdTrick\BlogTools;
  3. /**
  4. * Listen to delete events
  5. *
  6. * @package ColdTrick
  7. * @subpackage BlogTools
  8. */
  9. class DeleteHandler {
  10. /**
  11. * When a blog is removed also remove it's icons
  12. *
  13. * @param string $event 'delete'
  14. * @param string $type 'object'
  15. * @param ElggObject $object The ElggObject being removed
  16. *
  17. * @return void
  18. */
  19. public static function cleanupBlogIcon($event, $type, $object) {
  20. if (!elgg_instanceof($object, "object", "blog", "ElggBlog")) {
  21. return;
  22. }
  23. blog_tools_remove_blog_icon($object);
  24. }
  25. }