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";
    }
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";
    }
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" ; }
Initializes the widget.
This renders the open tag.
Initializes the widget . This renders the open tag .