dev-master
9999999-devProvides a outlook calendar integration for your Symfony 3 Project.
MIT
The Requires
- php >=5.6.0
- symfony/framework-bundle 3.*
The Development Requires
by Pierrick AUBIN
outlook calendar
Provides a outlook calendar integration for your Symfony 3 Project.
This bundle use Outlook API for list events in Outlook Calendar., (*1)
Please feel free to contribute, to fork, to send merge request and to create ticket., (*2)
Go to the application registration portal : https://apps.dev.microsoft.com, (*3)
Click on "Add an app" and put a name to your app., (*4)
Click on "Generate New Password" and copy the password, (*5)
Run, (*6)
composer require fungio/outlook-calendar-bundle:dev-master
``` php <?php // app/AppKernel.php, (*7)
public function registerBundles() { $bundles = [ // ... new Fungio\OutlookCalendarBundle\FungioOutlookCalendarBundle() ]; }, (*8)
### Step 3: Configuration ```yml # app/config/parameters.yml fungio_outlook_calendar: outlook_calendar: client_id: "YOUR_APPLICATION_ID" client_secret: "THE_PASSWORD_YOU_SAVED"
``` php <?php // in a controller $request = $this->get('request_stack')->getMasterRequest(); $session = new Session();, (*9)
$outlookCalendar = $this->get('fungio.outlook_calendar'); if ($session->has('fungio_outlook_calendar_access_token')) { // do nothing } else if ($request->query->has('code') && $request->get('code')) { $token = $outlookCalendar->getTokenFromAuthCode($request->get('code'), $redirectUri); $access_token = $token['access_token']; $session->set('fungio_outlook_calendar_access_token', $access_token); } else { return new RedirectResponse($outlookCalendar->getLoginUrl($redirectUri)); }, (*10)
$events = $outlookCalendar->getEventsForDate($session->get('fungio_outlook_calendar_access_token'), new \DateTime('now'); ```, (*11)
Provides a outlook calendar integration for your Symfony 3 Project.
MIT
outlook calendar