buttons[$type])) { // 如果类型不存在 默认为view $type = 'view'; } if ('' == $name) { // 名称为空,就用类型为名称 $name = $type; } $url = $this->createUrl($name, $model, $key, $index); return call_user_func($this->buttons[$type], $url, $model, $key); }, $this->template); } }