public function run()
{
$this->registerFiles();
$this->register();
if ($this->selector === null) {
if (isset($this->settings['multiple']) && $this->settings['multiple'] === true) {
return $this->render($this->template, ['selector' => $this->options['id'], 'paramName' => $this->paramName]);
} else {
$input = $this->hasModel() ? Html::activeHiddenInput($this->model, $this->attribute, $this->options) : Html::hiddenInput($this->name, $this->value, $this->options);
return $this->render($this->template, ['selector' => $this->getSelector(), 'input' => $input, 'paramName' => $this->paramName, 'value' => $this->hasModel() ? $this->model->{$this->attributeName} : $this->value, 'preview' => $this->preview, 'crop' => $this->crop, 'browseGlyphicon' => $this->browseGlyphicon]);
}
}
}