Exemple #1
0
 /**
  * Get and inital group data that match with rule.
  *
  * @param null $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);
         }
     }
 }