Box.php 617 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace App\Admin\Metrics;
  3. use Dcat\Admin\Widgets\Widget;
  4. /**
  5. * 盒子
  6. */
  7. class Box extends Widget
  8. {
  9. protected $view = 'admin_core.widgets.box';
  10. public $boxHtml = '';
  11. public function __construct($html)
  12. {
  13. $this->boxHtml = $html;
  14. }
  15. public function defaultVariables()
  16. {
  17. return [
  18. 'boxHtml' => $this->boxHtml,
  19. 'attributes' => $this->formatHtmlAttributes(),
  20. 'options' => $this->options,
  21. 'class' => $this->getElementClass(),
  22. 'selector' => $this->getElementSelector(),
  23. ];
  24. }
  25. }