Webform Status in Webform Submission Twig Template I'd like to use the current open/closed status of a webform in a conditional on the webform-submission-information.html.twig. There is a &quot;webform&quot; variable available to use in the template_preprocess_webform_submission_information function, but all that seems to do is print a link to the webform. When I try to use the usual methods that I'd usually use on a webform object, I just get WSOD. Something tells me that variable isn't actually an object.
For example, perhaps I could get the webform id and use that to figure out the status of the webform...
$form = $vars['webform']['details']['nid']['#value'];

Also, is there a resource for figuring out the pathing to the API is for the Webform? The documentation exists on the Drupal site certainly, but it'd be a lot easier if there was some kind of resource that gave us the path to all these data endpoints. As it stands, even if I figured out the correct function for extracting the webform's ID, I wouldn't have any clue how to find the status (open/closed) endpoint. There are some old d7 articles and issues out there, but it'd be nice if we didn't have to rely on issues and, instead, if there was intuitive documentation.
Indeed, calling {{ webform }} inside webform-submission-information.html.twig only contains a link. But since you have the webform_submission you can get the webform and from there can call isOpen and isClosed.
&lt;div class=&quot;current-webform-status&quot;&gt;
  &lt;b&gt;{{ 'Current Webform status'|t }}:&lt;/b&gt; {{ (webform_submission.getWebform.isOpen) ? 'Open'|t : 'Closed'|t }}
&lt;/div&gt;

or
&lt;div class=&quot;current-webform-status&quot;&gt;
  &lt;b&gt;{{ 'Current Webform status'|t }}:&lt;/b&gt;
  {% if webform_submission.getWebform.isOpen %}
    {{ 'Open'|t }}
  {% else %}
    {{ 'Closed'|t }}
  {% endif %}
&lt;/div&gt;