You are here

function _entity_share_ui_share_results_format in Entity Share 7

Format the batch results.

Parameters

object $node: The current node object to format results.

array $endpoint: The current endpoint.

array $results: The results array reference.

string $type: The type of the result (success, errors).

1 call to _entity_share_ui_share_results_format()
entity_share_ui_share_node in modules/entity_share_ui/modules/entity_share_ui_client/entity_share_ui_client.share.admin.inc
Batch operation to share a node.

File

modules/entity_share_ui/modules/entity_share_ui_client/entity_share_ui_client.share.admin.inc, line 381
Entity Share UI Client Admin Share file.

Code

function _entity_share_ui_share_results_format($node, array $endpoint, array &$results, $type = 'success') {
  $type = $type != 'success' ? 'errors' : $type;
  $results[$type]['nodes'][$node->nid] = check_plain($node->title);
  $results[$type]['endpoints'][$endpoint['eid']] = check_plain($endpoint['title']);
  $results[$type]['items'][$endpoint['eid']]['data'] = check_plain($endpoint['title']);
  $results[$type]['items'][$endpoint['eid']]['children'][] = check_plain($node->title);
}