public function init($default = null)
    {
        //getGroupByRule
        $options['type'] = $this->type;
        $options['template'] = $this->template;
        $groups = $this->getGroupByRule($options);

        if (count($groups)) {
            foreach ($groups as $groupId) {
                $group = Group::find($groupId);
                $this->initGroup($group, $default);
            }
        }
    }
public function init($default = null)
    {
        //getGroupByRule
        $options['type'] = $this->type;
        $options['template'] = $this->template;
        $groups = $this->getGroupByRule($options);

        if (count($groups)) {
            foreach ($groups as $groupId) {
                $group = Group::find($groupId);
                $this->initGroup($group, $default);
            }
        }
    }
public function init ( $ default = null ) { //getGroupByRule $ options [ 'type' ] = $ this -> type ; $ options [ 'template' ] = $ this -> template ; $ groups = $ this -> getGroupByRule ( $ options ) ; if ( count ( $ groups ) ) { foreach ( $ groups as $ groupId ) { $ group = Group :: find ( $ groupId ) ; $ this -> initGroup ( $ group , $ default ) ; } } }
Get and inital group data that match with rule.

@param null $default
Get and inital group data that match with rule .