/**
  * @param FolderInterface $folder
  *
  * @return FolderFacade
  *
  * @throws TransformerParameterTypeException
  */
 public function transform($folder)
 {
     if (!$folder instanceof FolderInterface) {
         throw new TransformerParameterTypeException();
     }
     $facade = $this->newFacade();
     $facade->folderId = $folder->getId();
     $facade->name = $folder->getName();
     $facade->createdAt = $folder->getCreatedAt();
     $facade->updatedAt = $folder->getUpdatedAt();
     if ($folder->getParent() instanceof FolderInterface) {
         $facade->parentId = $folder->getParent()->getId();
     } else {
         $facade->parentId = FolderInterface::ROOT_PARENT_ID;
     }
     $facade->siteId = $folder->getSiteId();
     return $facade;
 }
 /**
  * @param FolderInterface $parent
  */
 public function setParent(FolderInterface $parent)
 {
     $this->parent = $parent;
     $parent->addSubFolder($this);
 }
 /**
  * @param string          $message
  * @param FolderInterface $folder
  */
 protected function folderInfo($message, FolderInterface $folder)
 {
     $this->logger->info($message, array('folder_name' => $folder->getName()));
 }