public function index()
{
if ($this->isLoggedIn()) {
$this->storeLensVar('showmenu', true);
$author_bp = $this->blueprint('Author');
$announce_bp = $this->blueprint('Announcements');
$blog_bp = $this->blueprint('Blog');
$page_bp = $this->blueprint('CustomPages');
if (IDE_HACKS) {
$db = \Airship\get_database();
$author_bp = new Author($db);
$announce_bp = new Announcements($db);
$blog_bp = new Blog($db);
$page_bp = new CustomPages($db);
}
$this->lens('index', ['announcements' => $announce_bp->getForUser($this->getActiveUserId()), 'stats' => ['num_authors' => $author_bp->numAuthors(), 'num_comments' => $blog_bp->numComments(true), 'num_pages' => $page_bp->numCustomPages(true), 'num_posts' => $blog_bp->numPosts(true)], 'title' => \__('Dashboard')]);
} else {
$this->storeLensVar('showmenu', false);
$this->lens('login');
}
}