图片上传
value 为 Array类型

@param       $field
@param       $title
@param       $action
@param array $value
@return Upload
505392
public static function uploadImages($field, $title, $action, array $value = [])
    {
        $upload = self::upload($field, $title, $action, $value, Upload::TYPE_IMAGE);
        $upload->format(['jpg', 'jpeg', 'png', 'gif'])->accept('image/*');
        return $upload;

    }
395616
public static function textarea($field, $title, $value = '')
    {
        return self::input($field, $title, $value, Input::TYPE_TEXTAREA);
    }
160389
public static function url($field, $title, $value = '')
    {
        return self::input($field, $title, $value, Input::TYPE_URL);
    }
157248
public static function frame($field, $title, $src, $value = '', $type = Frame::TYPE_INPUT)
    {
        $length = is_array($value) ? 0 : 1;
        $frame = new Frame($field, $title, $value);
        $frame->maxLength($length)->src($src)->type($type);
        return $frame;
    }
714235
public function addAction($action)
    {
        if (! is_array($action) && ! $action instanceof AttachmentAction) {
            throw ActionCannotBeAdded::invalidType();
        }

        if (is_array($action)) {
            $name = $action['name'];
            $text = $action['text'];
            $type = $action['type'];

            $action = AttachmentAction::create($name, $text, $type);
        }

        $this->actions->push($action);

        return $this;
    }
221262
public static function dateMultiple($field, $title, array $value)
    {
        $date = self::datePicker($field, $title, $value, DatePicker::TYPE_DATE);
        return $date->multiple();
    }
261205
public function set($field, $value = null)
    {
        if (! is_array($field)) {
            $field = [$field => $value];
        }

        foreach ($field as $f => $v) {
            $this->update('$set', $f, $v);
        }

        return $this;
    }
518654
public static function time($field, $title, $value = '')
    {
        return self::timePicker($field, $title, (string)$value);
    }
551898
public static function cascader($field, $title, array $value = [], $type = Cascader::TYPE_OTHER)
    {
        $cascader = new Cascader($field, $title, $value);
        $cascader->type($type);
        return $cascader;
    }
1155318
public static function select($field, $title, $value = '')
    {
        $multiple = is_array($value) ? true : false;
        $select = new Select($field, $title, $value);
        $select->multiple($multiple);
        return $select;
    }
1209084
public function setFieldValue($object, $field, $value)
    {
        $this->assertObjectInstance($object);

        return $this->getField($field)->set($object, $value);
    }
11088
public function transform($value)
    {
        if (is_array($value)) {
            $value = $value[FileType::UPLOAD_FIELDNAME];
        }

        try {
            return array(
                FileType::UPLOAD_FIELDNAME => new File(call_user_func($this->callback, $value, $this->property))
            );
        } catch (FileNotFoundException $e) {
            return null;
        }
    }
35650
public function sendActionCardMsg($title, $content, $singleURL, $hideAvatar = 0, $btnOrientation = 0, $singleTitle = '阅读原文')
    {
        $query = [
            'msgtype' => 'actionCard',
            'actionCard' => [
                'title' => $title,
                'text' => $content,
                'hideAvatar' => $hideAvatar,
                'btnOrientation' => $btnOrientation,
                'singleTitle' => $singleTitle,
                'singleURL' => $singleURL
            ],
        ];
        return $this->sendMsg($query);
    }
739748
public static function month($field, $title, $value = '')
    {
        return self::datePicker($field, $title, (string)$value, DatePicker::TYPE_MONTH);
    }
325370
public function addProductInfo(string $title, string $value): self
    {
        $this->productInfo[] = [
            'title' => $title,
            'value' => $value,
        ];

        return $this;
    }
1323094
public function link($name, $value, $action = 'add')
    {
        $method_name = $action.'LinkAttribute';
        $this->$method_name($name, $value);

        return $this;
    }
1298361
public function add($title, BatchAction $action = null)
    {
        $id = $this->actions->count();

        if (func_num_args() == 1) {
            $action = $title;
            $action->setId($id);
        } elseif (func_num_args() == 2) {
            $action->setId($id);
            $action->setTitle($title);
        }

        $this->actions->push($action);

        return $this;
    }