本文整理汇总了PHP中steam_factory::create_calendar方法的典型用法代码示例。如果您正苦于以下问题:PHP steam_factory::create_calendar方法的具体用法?PHP steam_factory::create_calendar怎么用?PHP steam_factory::create_calendar使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类steam_factory
的用法示例。
在下文中一共展示了steam_factory::create_calendar方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: create_steam_structure
public function create_steam_structure($steam_connector, $name, $description, $env)
{
// CREATE CONTAINER FOR THIS WEBLOG
$new_calendar = steam_factory::create_calendar($steam_connector->get_id(), $name, $env, $description);
$new_calendar->set_attribute("OBJ_TYPE", "calendar_weblog_koala");
$all_user = steam_factory::groupname_to_object($steam_connector->get_id(), STEAM_ALL_USER);
$new_calendar->set_read_access($all_user);
// CREATE CONTAINER FOR CATEGORIES
$categories = steam_factory::create_container($steam_connector->get_id(), "categories", $new_calendar, "all categories for this weblog");
// CREATE CONTAINER FOR BLOGROLL
$blogroll = steam_factory::create_container($steam_connector->get_id(), "blogroll", $new_calendar, "blogroll for this weblog");
// CREATE CONTAINER FOR PODCASTING
$blogroll = steam_factory::create_container($steam_connector->get_id(), "podspace", $new_calendar, "multimedia files for podcasting");
// convert calendar to weblog to match result
$new_weblog = new steam_weblog($GLOBALS["STEAM"], $new_calendar->get_id());
return $new_weblog;
}
示例2: ajaxResponse
public function ajaxResponse(\AjaxResponseObject $ajaxResponseObject)
{
$ajaxResponseObject->setStatus("ok");
$env_room = \steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $this->id);
$calendar = \steam_factory::create_room($GLOBALS["STEAM"]->get_id(), $this->params["name"], $env_room);
$calendar->set_attribute("OBJ_TYPE", "calendar");
$steamCalendar = \steam_factory::create_calendar($GLOBALS["STEAM"]->get_id(), $this->params["name"] . "_calendar", null);
$calendar->set_attribute("GROUP_CALENDAR", $steamCalendar);
$steamCalendar->set_attribute("CALENDAR_OWNER", $calendar);
$calendar->set_attribute("CALENDAR_SUBSCRIPTIONS", array());
$jswrapper = new \Widgets\JSWrapper();
$jswrapper->setJs(<<<END
\t\tcloseDialog();
\t\tlocation.reload();
\t\t
END
);
$ajaxResponseObject->addWidget($jswrapper);
return $ajaxResponseObject;
}