You are here

public function EntityShareClient::create in Entity Share 7

Create an entity.

Parameters

string $entity_type: Node, etc.

mixed $datas: Datas of the request.

Return value

object Object of the response.

File

includes/entity_share.client.inc, line 207
Class for handling communication with Entity Share Server.

Class

EntityShareClient
Entity Share Client class.

Code

public function create($entity_type, $datas) {

  // Append path to endpoint URL.
  $url = $this->endpointUrl . '/' . $entity_type;
  return $this
    ->call($url, 'POST', $datas);
}