original_string: public function init()
      {
          parent::init();
  
          if (empty($this->htmlOptions['id'])) {
              $this->htmlOptions['id'] = $this->id;
          }
  
          if ($this->useHtmlData) {
              if (isset($this->options['data'])) {
                  $this->items = (array)$this->options['data'];
                  unset($this->options['data']);
              }
              if (isset($this->options['spinner'])) {
                  $this->spinner = (array)$this->options['spinner'];
                  unset($this->options['spinner']);
              }
              foreach ($this->options as $option => $value) {
                  $this->htmlOptions['data-' . $option] = $value;
              }
              $this->options = [];
          }
  
          $this->htmlOptions['data-auto'] = 'false'; // disable auto init
  
          if (!empty($this->items)) {
              $this->options['data'] = $this->items;
          }
          if (!empty($this->spinner)) {
              $this->options['spinner'] = $this->spinner;
          }
  
          echo Html::beginTag($this->tagName, $this->htmlOptions) . "\n";
      }
code: public function init()
      {
          parent::init();
  
          if (empty($this->htmlOptions['id'])) {
              $this->htmlOptions['id'] = $this->id;
          }
  
          if ($this->useHtmlData) {
              if (isset($this->options['data'])) {
                  $this->items = (array)$this->options['data'];
                  unset($this->options['data']);
              }
              if (isset($this->options['spinner'])) {
                  $this->spinner = (array)$this->options['spinner'];
                  unset($this->options['spinner']);
              }
              foreach ($this->options as $option => $value) {
                  $this->htmlOptions['data-' . $option] = $value;
              }
              $this->options = [];
          }
  
          $this->htmlOptions['data-auto'] = 'false'; // disable auto init
  
          if (!empty($this->items)) {
              $this->options['data'] = $this->items;
          }
          if (!empty($this->spinner)) {
              $this->options['spinner'] = $this->spinner;
          }
  
          echo Html::beginTag($this->tagName, $this->htmlOptions) . "\n";
      }
code_tokens: public function init ( ) { parent :: init ( ) ; if ( empty ( $ this -> htmlOptions [ 'id' ] ) ) { $ this -> htmlOptions [ 'id' ] = $ this -> id ; } if ( $ this -> useHtmlData ) { if ( isset ( $ this -> options [ 'data' ] ) ) { $ this -> items = ( array ) $ this -> options [ 'data' ] ; unset ( $ this -> options [ 'data' ] ) ; } if ( isset ( $ this -> options [ 'spinner' ] ) ) { $ this -> spinner = ( array ) $ this -> options [ 'spinner' ] ; unset ( $ this -> options [ 'spinner' ] ) ; } foreach ( $ this -> options as $ option => $ value ) { $ this -> htmlOptions [ 'data-' . $ option ] = $ value ; } $ this -> options = [ ] ; } $ this -> htmlOptions [ 'data-auto' ] = 'false' ; // disable auto init if ( ! empty ( $ this -> items ) ) { $ this -> options [ 'data' ] = $ this -> items ; } if ( ! empty ( $ this -> spinner ) ) { $ this -> options [ 'spinner' ] = $ this -> spinner ; } echo Html :: beginTag ( $ this -> tagName , $ this -> htmlOptions ) . "\n" ; }
docstring: Initializes the widget.
  This renders the open tag.
docstring_tokens: Initializes the widget . This renders the open tag .