$type_name)); if ($result['stat'] == 'ok') { $name = $result['schema']['name']; $rows = array(); foreach ($result['schema']['attr_defs'] as $typeInfo) { $row = array(); $row['name'] = $typeInfo['name']; $row['type'] = $typeInfo['type']; $row['description'] = isset($typeInfo['description']) ? $typeInfo['description'] : NULL; unset($typeInfo['name'], $typeInfo['type'], $typeInfo['description']); $items = array(); foreach ($typeInfo as $k => $v) { $items[] = t('@k: @v', array('@k' => $k, '@v' => print_r($v, TRUE))); } $row['other'] = theme('item_list', array('items' => $items)); $rows[] = $row; } $header = array( t('Name'), t('Type'), t('Description'), t('Other'), ); $ret = array( '#theme' => 'table', '#header' => $header, '#rows' => $rows, ); } else { $ret = t('Operation did not succeed.'); } return $ret; } public static function getAccessSchema($type_name = 'user', $client_id = NULL) { $api = static::$api; if (empty($client_id)) { $client_id = $api->clientId; } $read = $api('entityType.getAccessSchema', array( 'type_name' => $type_name, 'for_client_id' => $client_id, 'access_type' => 'read', )); dsm($read); $write = $api('entityType.getAccessSchema', array( 'type_name' => $type_name, 'for_client_id' => $client_id, 'access_type' => 'read', )); dsm($write); } }