public function Embed::nodeStatus in CMS Content Sync 2.1.x
Same name and namespace in other branches
- 2.0.x src/Controller/Embed.php \Drupal\cms_content_sync\Controller\Embed::nodeStatus()
1 string reference to 'Embed::nodeStatus'
File
- src/
Controller/ Embed.php, line 169
Class
- Embed
- Class Embed provides helpers to embed Sync Core functionality into the site.
Namespace
Drupal\cms_content_sync\ControllerCode
public function nodeStatus(NodeInterface $node) {
$this
->init();
$user = \Drupal::currentUser();
$params = [
'configurationAccess' => $user
->hasPermission('administer cms content sync'),
];
if (EntityHandlerPluginManager::isEntityTypeConfiguration($node
->getEntityTypeId())) {
$params['remoteUniqueId'] = $node
->id();
}
else {
$params['remoteUuid'] = $node
->uuid();
}
// TODO: Show warning if not using Sync Core v2 yet, so users understand why it's empty.
$embed = $this->embedService
->entityStatus($params);
return $this
->run($embed);
}