TreeHelper.php 369 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace common\helpers;
  3. /**
  4. * Class TreeHelper
  5. * @package common\helpers
  6. * @author qimall
  7. */
  8. class TreeHelper
  9. {
  10. /**
  11. * @return string
  12. */
  13. public static function prefixTreeKey($id)
  14. {
  15. return "tr_$id ";
  16. }
  17. /**
  18. * @return string
  19. */
  20. public static function defaultTreeKey()
  21. {
  22. return 'tr_0 ';
  23. }
  24. }