public function onAttach(SiteAttachEvent $event)
    {
        // On 08/09/2016, I stumbled upon this piece of code. Long story short:
        // when you reference a node in a site, it duplicates the original site
        // layout in the new site.
        //
        // While I could see some kind of use for this, I am not sure this is
        // really necessary.
        //
        // I am quite sure that the original wanted behavior was on node clone
        // and not on node reference: when you want to edit a node that's not
        // yours, on your site, the application propose that you may clone it on
        // the site instead of editing the original node, at this exact point in
        // time, you do need to duplicate layouts.

        // Do no run when in edit mode
        if ($this->context->hasToken()) {
            return;
        }

        $siteIdList = $event->getSiteIdList();
        /* @var \Drupal\node\NodeInterface[] $nodeList */
        $nodeList = $this->entityManager->getStorage('node')->loadMultiple($event->getNodeIdList());

        $pageContext = $this->contextManager->getPageContext();
        $storage = $pageContext->getStorage();

        // @todo Find a better way
        foreach ($siteIdList as $siteId) {
            foreach ($nodeList as $node) {

                if (!$node->site_id) {
                    continue;
                }

                // Ensure a layout does not already exists (for example when
                // cloning a node, the layout data already has been inserted
                // if the original was existing).
                $exists = (bool)$this
                    ->db
                    ->query(
                        "SELECT 1 FROM {ucms_layout} WHERE nid = :nid AND site_id = :sid",
                        [':nid' => $node->id(), ':sid' => $siteId]
                    )
                    ->fetchField()
                ;

                if ($exists) {
                    return;
                }

                $layout = $storage->findForNodeOnSite($node->id(), $node->site_id);

                if ($layout) {
                    $clone = clone $layout;
                    $clone->setId(null);
                    $clone->setSiteId($siteId);

                    foreach ($clone->getAllRegions() as $region) {
                        $region->toggleUpdateStatus(true);
                    }

                    $storage->save($clone);
                }
            }
        }
    }