Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. SafeAnalysisNodeVisitor.php

function SafeAnalysisNodeVisitor::getSafe

Return value

array

1 call to SafeAnalysisNodeVisitor::getSafe()
SafeAnalysisNodeVisitor::leaveNode in vendor/twig/twig/src/NodeVisitor/SafeAnalysisNodeVisitor.php
Called after child nodes are visited.

File

vendor/twig/twig/src/NodeVisitor/SafeAnalysisNodeVisitor.php, line 43

Class

SafeAnalysisNodeVisitor
@internal

Namespace

Twig\NodeVisitor

Code

public function getSafe(Node $node) {
    $hash = spl_object_hash($node);
    if (!isset($this->data[$hash])) {
        return [];
    }
    foreach ($this->data[$hash] as $bucket) {
        if ($bucket['key'] !== $node) {
            continue;
        }
        if (\in_array('html_attr', $bucket['value'])) {
            $bucket['value'][] = 'html';
        }
        return $bucket['value'];
    }
    return [];
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal