public function init() { if (JRequest::getVar('code', null) == null) { header('Location: ' . GAnalyticsDataHelper::getClient()->createAuthUrl()); } else { $this->items = $this->get('Items'); } }