AbstractTool2.php 503 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace UCore\DcatAdmin\Show;
  3. use Dcat\Admin\Show\AbstractTool;
  4. /**
  5. *
  6. * 详情页面的动作
  7. */
  8. class AbstractTool2 extends AbstractTool
  9. {
  10. public function getRow()
  11. {
  12. return $this->parent->model();
  13. }
  14. /**
  15. * @return string
  16. */
  17. public function title(): string
  18. {
  19. return __($this->title);
  20. }
  21. public function render()
  22. {
  23. if (!$this->allowed()) {
  24. return '';
  25. }
  26. return $this->render2();
  27. }
  28. }