public function setData(array $data)
    {
        $this->isMergingData = true;
        /**
         * @todo Kinda hacky, but works with the concept of form.
         *     Should work embeded in a form group or in a dashboard.
         */
        $data = array_merge($_GET, $data);

        parent::setData($data);

        /** Merge any available presets */
        $data = $this->mergePresets($data);

        parent::setData($data);

        $this->isMergingData = false;

        if ($this->lang()) {
            $this->translator()->setLocale($this->lang());
        }

        return $this;
    }
public function setData(array $data)
    {
        $this->isMergingData = true;
        /**
         * @todo Kinda hacky, but works with the concept of form.
         *     Should work embeded in a form group or in a dashboard.
         */
        $data = array_merge($_GET, $data);

        parent::setData($data);

        /** Merge any available presets */
        $data = $this->mergePresets($data);

        parent::setData($data);

        $this->isMergingData = false;

        if ($this->lang()) {
            $this->translator()->setLocale($this->lang());
        }

        return $this;
    }
public function setData ( array $ data ) { $ this -> isMergingData = true ; /**
         * @todo Kinda hacky, but works with the concept of form.
         *     Should work embeded in a form group or in a dashboard.
         */ $ data = array_merge ( $ _GET , $ data ) ; parent :: setData ( $ data ) ; /** Merge any available presets */ $ data = $ this -> mergePresets ( $ data ) ; parent :: setData ( $ data ) ; $ this -> isMergingData = false ; if ( $ this -> lang ( ) ) { $ this -> translator ( ) -> setLocale ( $ this -> lang ( ) ) ; } return $ this ; }
Set the widget's data.

@param array $data The widget data.
@return self
Set the widget s data .