IsShowDiyComponentsEvent.php 769 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. namespace common\events\mall;
  3. use common\components\BaseEvent;
  4. use common\enums\EventNameEnum;
  5. final class IsShowDiyComponentsEvent extends BaseEvent
  6. {
  7. /**
  8. * 触发事件名称(不可修改)
  9. *
  10. * @var string
  11. */
  12. public $name = EventNameEnum::IS_SHOW_DIY_COMPONENTS;
  13. protected $isShow = 1;
  14. /**
  15. * @var int
  16. */
  17. public $mall_id;
  18. /**
  19. * @var array
  20. */
  21. public $listeners = [];
  22. public function __construct(int $mall_id)
  23. {
  24. $this->mall_id = $mall_id;
  25. }
  26. /**
  27. * @return void
  28. */
  29. public function setNoShow()
  30. {
  31. $this->isShow = 0;
  32. }
  33. /**
  34. * @return int
  35. */
  36. public function getIsShow(): int
  37. {
  38. return $this->isShow;
  39. }
  40. }