本文整理匯總了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;
}