RowBase.php 650 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: Administrator
  5. * Date: 2021/2/18
  6. * Time: 16:56
  7. */
  8. namespace app\backend\modules\order\services\row;
  9. abstract class RowBase
  10. {
  11. protected $order;
  12. protected $sort;
  13. public function __construct($order, $sort = 0)
  14. {
  15. $this->order = $order;
  16. $this->sort = $sort;
  17. }
  18. /**
  19. * 排序
  20. * @return int
  21. */
  22. public function sort()
  23. {
  24. return $this->sort;
  25. }
  26. /**
  27. * 是否显示
  28. * @return bool
  29. */
  30. abstract function enable();
  31. /**
  32. * 显示内容
  33. * @return array|string
  34. */
  35. abstract function getContent();
  36. }