예제 #1
0
 /**
  * Registers assets
  */
 protected function registerAssets()
 {
     $view = $this->getView();
     DateFormatterAsset::register($view);
     DateControlAsset::register($view);
     $pluginOptions = empty($this->pluginOptions) ? [] : $this->pluginOptions;
     $this->pluginOptions = ArrayHelper::merge([
         'idSave' => $this->saveOptions['id'],
         'url' => $this->ajaxConversion ? Url::to([$this->_module->convertAction]) : '',
         'type' => $this->type,
         'saveFormat' => $this->saveFormat,
         'dispFormat' => $this->displayFormat,
         'saveTimezone' => $this->saveTimezone,
         'dispTimezone' => $this->displayTimezone,
         'asyncRequest' => $this->asyncRequest
     ], $pluginOptions);
     $this->registerPlugin($this->_pluginName);
     if ($this->isWidget() && !empty($this->options[$this->_dataVar])) {
         $this->options['options'][$this->_dataVar] = $this->options[$this->_dataVar];
         unset($this->options[$this->_dataVar]);
     }
 }
예제 #2
0
 /**
  * Registers assets
  */
 protected function registerAssets()
 {
     $view = $this->getView();
     DateFormatterAsset::register($view);
     DateControlAsset::register($view);
     $pluginOptions = empty($this->pluginOptions) ? [] : $this->pluginOptions;
     $this->pluginOptions = ArrayHelper::merge(['idSave' => $this->saveOptions['id'], 'url' => $this->ajaxConversion ? Url::to([$this->_module->convertAction]) : '', 'type' => $this->type, 'saveFormat' => $this->saveFormat, 'dispFormat' => $this->displayFormat, 'saveTimezone' => $this->saveTimezone, 'dispTimezone' => $this->displayTimezone], $pluginOptions);
     $this->registerPlugin('datecontrol');
     if ($this->isWidget()) {
         unset($this->options['data-plugin-name'], $this->options['data-plugin-options']);
     }
 }