Пример #1
0
function _moysklad_get_list2($type, $nodeName)
{
    $result = array();
    $offset = 0;
    do {
        $content = simplexml_load_string(_moysklad_get_connector($type, "list", $offset));
        // dpm((string)$content->attributes()->total);
        foreach ($content->children() as $key => $value) {
            if ($value->{$nodeName} != '') {
                $result[(string) $value->uuid] = (string) $value->{$nodeName};
            }
        }
        $offset += 1000;
        // dpm ($offset);
    } while ((int) $content->attributes()->total > (int) $content->attributes()->start);
    return $result;
}
Пример #2
0
function _moysklad_check_auuid()
{
    if (_moysklad_get_connector("Company", variable_get('default_auuid', ''))) {
        drupal_set_message(t('default user uuid set'));
    } else {
        drupal_set_message(t('default user uuid Incorrect'), 'error');
    }
}