Edit.php 478 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace Dcat\Admin\Grid\Actions;
  3. use Dcat\Admin\Grid\RowAction;
  4. class Edit extends RowAction
  5. {
  6. /**
  7. * @return array|null|string
  8. */
  9. public function title()
  10. {
  11. if ($this->title) {
  12. return $this->title;
  13. }
  14. return '<i class="feather icon-edit-1"></i> '.__('admin.edit');
  15. }
  16. /**
  17. * @return string
  18. */
  19. public function href()
  20. {
  21. return $this->parent->getEditUrl($this->getKey());
  22. }
  23. }