getSettingsSections() public method

개인 회원정보 설정 페이지는 여러개의 섹션(메뉴)로 구성된다. 기본적으로 Xpressengien은 '회원 기본정보 설정' 섹션이 가지고 있고, 다른 서드파티에서 자유롭게 섹션을 추가할 수 있다. 예) 소셜로그인 플러그인의 '외부 로그인 설정' 섹션 이 메소드는 이렇게 등록된 섹션 목록을 반환한다.
public getSettingsSections ( ) : array
return array 등록된 회원정보 설정 페이지 섹션 목록
 /**
  * show
  *
  * @param Request $request
  * @param string  $section
  *
  * @return \Xpressengine\Presenter\RendererInterface
  */
 public function show(Request $request, $section = 'settings')
 {
     // remove & move code
     $settingsSection = ['settings' => ['title' => xe_trans('xe::defaultSettings'), 'content' => function ($user) {
         return $this->userEditView($user);
     }]];
     // get sections
     $menus = $this->handler->getSettingsSections();
     // add default settings section
     $menus = array_merge($settingsSection, $menus);
     // get Selected section
     if (isset($menus[$section]) === false) {
         throw new NotFoundHttpException();
     }
     $selectedSection = $menus[$section];
     if ($selectedSection === null) {
         $selectedSection = reset($menus);
     }
     // get current user
     $user = $this->user;
     $content = $selectedSection['content'];
     $tabContent = $content instanceof \Closure ? $content($user) : $content;
     return XePresenter::make('index', compact('user', 'menus', 'tabContent'));
 }