/**
  * {@inheritdoc}
  */
 public function synchronize(NodeInterface $node, Context $context, $dirtyAllowed = false)
 {
     /* @var $node \USync\AST\Drupal\MenuNode */
     $object = ['name' => $node->getName()];
     if ($node->hasChild('name')) {
         $object['title'] = (string) $node->getChild('name')->getValue();
     }
     if ($node->hasChild('description')) {
         $object['description'] = (string) $node->getChild('description')->getValue();
     }
     $object += self::$defaults;
     if ($node->shouldDropOnUpdate()) {
         $context->log(sprintf("%s: deleting menu and children", $node->getPath()));
         $this->storage->delete($node->getName());
     }
     if ($this->storage->exists($node->getName())) {
         $this->storage->update($node->getName(), $object);
     } else {
         $this->storage->create($node->getName(), $object);
     }
     return $node->getName();
 }