public function setData(array $data)
    {
        if (isset($data['attachables'])) {
            $this->setAttachables($data['attachables']);
        }

        if (isset($data['groups'])) {
            $this->setGroups($data['groups']);
        }

        if (isset($data['widgets'])) {
            $this->setWidgets($data['widgets']);
        }

        unset($data['attachables'], $data['groups'], $data['widgets']);

        return parent::setData($data);
    }
public function setData(array $data)
    {
        if (isset($data['attachables'])) {
            $this->setAttachables($data['attachables']);
        }

        if (isset($data['groups'])) {
            $this->setGroups($data['groups']);
        }

        if (isset($data['widgets'])) {
            $this->setWidgets($data['widgets']);
        }

        unset($data['attachables'], $data['groups'], $data['widgets']);

        return parent::setData($data);
    }
public function setData ( array $ data ) { if ( isset ( $ data [ 'attachables' ] ) ) { $ this -> setAttachables ( $ data [ 'attachables' ] ) ; } if ( isset ( $ data [ 'groups' ] ) ) { $ this -> setGroups ( $ data [ 'groups' ] ) ; } if ( isset ( $ data [ 'widgets' ] ) ) { $ this -> setWidgets ( $ data [ 'widgets' ] ) ; } unset ( $ data [ 'attachables' ] , $ data [ 'groups' ] , $ data [ 'widgets' ] ) ; return parent :: setData ( $ data ) ; }
Set attachments settings in a specific order.

@param  array $data New config values.
@return AttachmentsConfig Chainable
Set attachments settings in a specific order .