<?php

class Groups extends Cf_Controller
{
    public function __construct()
    {
        parent::__construct();
        setCurrentApplication('groups_app');
    }

    /**
     * Groups app. The shell view mounts the React bundle on #groups-root; no
     * AngularJS/carabiner JS is loaded here.
     */
    public function index()
    {
        $this->load->model('ProfileModel');
        $this->ProfileModel->setAdditionalData(
            $this->session->userdata('username'),
            ProfileModel::GROUPS_APP_OPENED_KEY,
            true,
        );

        $data = ['title' => 'Mission Portal - Groups'];

        $this->template->load('template', 'groups_app/index', $data);
    }
}
