本文整理汇总了PHP中CUserOptions::getList方法的典型用法代码示例。如果您正苦于以下问题:PHP CUserOptions::getList方法的具体用法?PHP CUserOptions::getList怎么用?PHP CUserOptions::getList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CUserOptions
的用法示例。
在下文中一共展示了CUserOptions::getList方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: migrateData
public static function migrateData()
{
$res = \CUserOptions::getList(array(), array("CATEGORY" => "socialnetwork", "NAME" => "log_destination"));
while ($option = $res->fetch()) {
if (!empty($option["VALUE"])) {
$optionValue = unserialize($option["VALUE"]);
if (is_array($optionValue)) {
foreach ($optionValue as $key => $val) {
if (in_array($key, array("users", "sonetgroups", "department", "companies", "contacts", "leads", "deals"))) {
$codes = \CUtil::jsObjectToPhp($val);
if (is_array($codes)) {
\Bitrix\Main\FinderDestTable::merge(array("USER_ID" => $option["USER_ID"], "CONTEXT" => "blog_post", "CODE" => array_keys($codes)));
}
}
}
}
}
}
$res = \CUserOptions::getList(array(), array("CATEGORY" => "crm", "NAME" => "log_destination"));
while ($option = $res->fetch()) {
if (!empty($option["VALUE"])) {
$optionValue = unserialize($option["VALUE"]);
if (is_array($optionValue)) {
foreach ($optionValue as $key => $val) {
$codes = explode(',', $val);
if (is_array($codes)) {
\Bitrix\Main\FinderDestTable::merge(array("USER_ID" => $option["USER_ID"], "CONTEXT" => "crm_post", "CODE" => $codes));
}
}
}
}
}
}