<?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() { $ptV5f = new static(); return $ptV5f; } public function variables($j5r5q) { $this->variables = $j5r5q; return $this; } public function imageConfig($m6H3T) { $this->imageConfig = $m6H3T; return $this; } public function selectorDialogServer($xJlkq) { $this->selectorDialogServer = $xJlkq; return $this; } public static function imageConfigDefault() { goto tDp9k; tDp9k: $wcvhk = 600; goto jWp3L; brvCW: return $xA643; goto moTeT; jWp3L: $fiy0t = 800; goto jjCXA; jjCXA: $xA643 = array('width' => $wcvhk, 'height' => $fiy0t, 'backgroundImage' => modstart_web_url('asset/image/none.png'), 'font' => null, 'blocks' => array(array('type' => 'text', 'x' => $wcvhk / 2, 'y' => 100, 'data' => array('text' => '文字内容', 'color' => '#000000', 'bold' => false, 'size' => 20, 'align' => 'center')), array('type' => 'image', 'x' => $wcvhk / 2, 'y' => 200, 'data' => array('opacity' => 50, 'width' => 100, 'height' => 100, 'image' => modstart_web_url('asset/image/none.png'))), array('type' => 'qrcode', 'x' => $wcvhk / 2, 'y' => 300, 'data' => array('width' => 100, 'height' => 100, 'text' => '这里是二维码的内容')))); goto brvCW; moTeT: } 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 Q9Ku0; Q9Ku0: $this->prepareDefault(); goto eRsGD; qPYhV: echo RenderUtil::view('module::Vendor.View.quickRun.imageDesign.index', $tnNXa); goto z7KLF; eRsGD: $tnNXa = array('variables' => $this->variables, 'imageConfig' => $this->imageConfig, 'selectorDialogServer' => $this->selectorDialogServer); goto qPYhV; z7KLF: } }