Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
This shows an example implementation of content adapters at the module level.
* Copyright (c) 2008 Massachusetts Institute of Technology
* Licensed under the MIT License
* Redistributions of files must retain the above copyright notice.
// various copy includes
require_once "../../";
require_once "data/";
// records stats
require_once "../page_builder/page_header.php";
// figures out from info.yml which adapter to use and requires it
$adapter = ModuleAdapter::find();
require_once "adapters/".$adapter."/adapter.php";
// libs
require_once "lib/calendar.lib.php";
require_once "lib/textformat.lib.php";
$id = $_REQUEST['id'];
// use the getCategoryEvents() to find all events for this category
$eventFeed = CalendarAdapter::getCategoryEvents($calendars[$id]['user']);
require "templates/$prefix/category.html";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.