private function getGroups()
    {
        if ($this->_groups === null) {
            $this->_groups = Group::find()->all();
        }

        return $this->_groups;
    }
private function getGroups()
    {
        if ($this->_groups === null) {
            $this->_groups = Group::find()->all();
        }

        return $this->_groups;
    }
private function getGroups ( ) { if ( $ this -> _groups === null ) { $ this -> _groups = Group :: find ( ) -> all ( ) ; } return $ this -> _groups ; }
Get all groups as singleton instance.

@return \yii\db\ActiveRecord
Get all groups as singleton instance .