public function EntityManager::putRemoteEntities in Acquia Content Hub 8
PUT entities for update to Content Hub, without site callback.
Parameters
mixed $entities: An array of entities.
Return value
bool TRUE if request succeeds, FALSE otherwise.
File
- src/
EntityManager.php, line 310
Class
- EntityManager
- Provides a service for managing entity actions for Content Hub.
Namespace
Drupal\acquia_contenthubCode
public function putRemoteEntities($entities) {
if (!isset($entities['entities'])) {
$entities = [
'entities' => $entities,
];
}
if ($response = $this->clientManager
->createRequest('putEntities', [
$entities,
])) {
$response = Json::decode($response
->getBody());
}
return !empty($response['success']);
}