本文整理匯總了PHP中block_base::config_save方法的典型用法代碼示例。如果您正苦於以下問題:PHP block_base::config_save方法的具體用法?PHP block_base::config_save怎麽用?PHP block_base::config_save使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類block_base
的用法示例。
在下文中一共展示了block_base::config_save方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array
function after_install()
{
global $CFG;
// initialize the global configuration
$global_config = array("block_moodle_notifications_email_channel" => 1, "block_moodle_notifications_sms_channel" => 1, "block_moodle_notifications_rss_channel" => 1, "block_moodle_notifications_frequency" => 12, "block_moodle_notifications_email_notification_preset" => 1, "block_moodle_notifications_sms_notification_preset" => 1);
return parent::config_save($global_config);
}
示例2:
/**
* Default behavior: save all variables as $CFG properties
* You don't need to override this if you 're satisfied with the above
*
* @param array $data
* @return boolean
*/
function config_save($data)
{
print_object($data);
die;
return parent::config_save($data);
}