/**
  * renders <f:then> child if access to the given resource is allowed, otherwise renders <f:else> child.
  *
  * @param string $resource Policy resource
  * @return string the rendered string
  * @api
  */
 public function render($resource)
 {
     if ($this->accessDecisionManager->hasAccessToResource($resource)) {
         return $this->renderThenChild();
     } else {
         return $this->renderElseChild();
     }
 }