| 12345678910111213141516171819202122232425262728293031323334353637 |
- <?php
- namespace UCore\DcatAdmin\Metrics;
- use Dcat\Admin\Widgets\Widget;
- class Image extends Widget
- {
- protected $view = 'admin_core.widgets.image';
- public $src = '';
- public $height = '100px';
- public $width = '100px';
- public function __construct($imgSrc, $height = '100px', $width ="100px")
- {
- $this->src = $imgSrc;
- $this->height = $height;
- $this->width = $width;
- }
- public function defaultVariables()
- {
- return [
- 'src' => $this->src,
- 'width' => $this->width,
- 'height' => $this->height,
- 'attributes' => $this->formatHtmlAttributes(),
- 'options' => $this->options,
- 'class' => $this->getElementClass(),
- 'selector' => $this->getElementSelector(),
- ];
- }
- }
|