<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Vendor\QuickRun\ImageDesign; use ModStart\Core\Util\RenderUtil; use ModStart\Layout\Buildable; class ImageDesign implements Buildable { private $variables = array(); private $imageConfig = array(); private $selectorDialogServer = null; public static function make() { $vNjqq = new static(); return $vNjqq; } public function variables($JMqy7) { $this->variables = $JMqy7; return $this; } public function imageConfig($PEG0w) { $this->imageConfig = $PEG0w; return $this; } public function selectorDialogServer($dAE2L) { $this->selectorDialogServer = $dAE2L; return $this; } public static function imageConfigDefault() { goto Aw5jD; Aw5jD: $KbRl4 = 600; goto h13lJ; h13lJ: $HyzrK = 800; goto ZLsX6; jDzHh: return $XhVgh; goto BwdxD; ZLsX6: $XhVgh = array('width' => $KbRl4, 'height' => $HyzrK, 'backgroundImage' => modstart_web_url('asset/image/none.png'), 'font' => null, 'blocks' => array(array('type' => 'text', 'x' => $KbRl4 / 2, 'y' => 100, 'data' => array('text' => '文字内容', 'color' => '#000000', 'bold' => false, 'size' => 20, 'align' => 'center')), array('type' => 'image', 'x' => $KbRl4 / 2, 'y' => 200, 'data' => array('opacity' => 50, 'width' => 100, 'height' => 100, 'image' => modstart_web_url('asset/image/none.png'))), array('type' => 'qrcode', 'x' => $KbRl4 / 2, 'y' => 300, 'data' => array('width' => 100, 'height' => 100, 'text' => '这里是二维码的内容')))); goto jDzHh; BwdxD: } private function prepareDefault() { if (empty($this->imageConfig)) { $this->imageConfig = self::imageConfigDefault(); } if (empty($this->selectorDialogServer)) { $this->selectorDialogServer = modstart_admin_url('data/file_manager'); } } public function build() { goto SEtcB; SEtcB: $this->prepareDefault(); goto D9MjZ; dzWJR: echo RenderUtil::view('module::Vendor.View.quickRun.imageDesign.index', $rQcY1); goto mldEZ; D9MjZ: $rQcY1 = array('variables' => $this->variables, 'imageConfig' => $this->imageConfig, 'selectorDialogServer' => $this->selectorDialogServer); goto dzWJR; mldEZ: } }