Iframe.php 580 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace UCore\DcatAdmin\Widgets;
  3. use Dcat\Admin\Widgets\Widget;
  4. class Iframe extends Widget
  5. {
  6. public $width = '1000px';
  7. public $height = '500px';
  8. public $view = 'admin_core.widgets.iframe';
  9. protected $title;
  10. protected $url;
  11. public function __construct($url, $width = '1000px')
  12. {
  13. $this->url = $url;
  14. $this->width = $width;
  15. }
  16. public function defaultVariables()
  17. {
  18. return [
  19. 'width' => $this->width,
  20. 'height' => $this->height,
  21. 'url' => $this->url
  22. ];
  23. }
  24. }