public function getParentContainer(Container $container)
 {
     if (null !== $container->getParentId()) {
         return $this->parentContainer;
     }
     return $container;
 }
 /**
  * Returns the (parent) project container for the given container. If the container is a project
  * branch container then its project container will be returned. If the container is a project
  * container then it will be returned.
  *
  * @param Container $container
  * @return Container
  */
 public function getParentContainer(Container $container)
 {
     if (null !== ($id = $container->getParentId())) {
         return $this->findOneById($id);
     }
     return $container;
 }