‪TYPO3CMS  ‪main
TYPO3\CMS\Core\TypoScript\AST\CurrentObjectPath\CurrentObjectPath Class Reference

Public Member Functions

 __construct (NodeInterface ... $path)
 
 append (NodeInterface $node)
 
NodeInterface[] getAll ()
 
 getPathAsString ()
 
 getFirst ()
 
 getLast ()
 
 getSecondLast ()
 
 removeLast ()
 

Private Attributes

array $path
 

Detailed Description

Internal state class to track the current hierarchy in tree. This is important in combination with block open "{" and block close "}" brackets. Also used in BE Template Object Browser tree rendering.

: Internal AST structure.

Definition at line 31 of file CurrentObjectPath.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\TypoScript\AST\CurrentObjectPath\CurrentObjectPath::__construct ( NodeInterface ...  $path)

Member Function Documentation

◆ append()

TYPO3\CMS\Core\TypoScript\AST\CurrentObjectPath\CurrentObjectPath::append ( NodeInterface  $node)

◆ getAll()

NodeInterface [] TYPO3\CMS\Core\TypoScript\AST\CurrentObjectPath\CurrentObjectPath::getAll ( )

◆ getFirst()

◆ getLast()

TYPO3\CMS\Core\TypoScript\AST\CurrentObjectPath\CurrentObjectPath::getLast ( )

◆ getPathAsString()

TYPO3\CMS\Core\TypoScript\AST\CurrentObjectPath\CurrentObjectPath::getPathAsString ( )

Turn current object path into a string. Quote dots in keys. Used in BE Template Object Browser tree, expand and search handling. Not implementing __toString() here since Fluid can't call this.

Example: page.10.foo.bar.baz

Definition at line 64 of file CurrentObjectPath.php.

References TYPO3\CMS\Core\TypoScript\AST\CurrentObjectPath\CurrentObjectPath\getAll().

Referenced by TYPO3\CMS\Core\TypoScript\AST\Visitor\AstConstantCommentVisitor\visitBeforeChildren().

◆ getSecondLast()

TYPO3\CMS\Core\TypoScript\AST\CurrentObjectPath\CurrentObjectPath::getSecondLast ( )

Definition at line 90 of file CurrentObjectPath.php.

◆ removeLast()

TYPO3\CMS\Core\TypoScript\AST\CurrentObjectPath\CurrentObjectPath::removeLast ( )

Member Data Documentation

◆ $path