Documentation

TwigTokenParserTryCatch extends AbstractTokenParser
in package

Handles try/catch in template file.

{% try %}
   
  • {{ user.get('name') }}
  • {% catch %} {{ e.message }} {% endcatch %}

    Table of Contents

    Methods

    decideCatch()  : bool
    decideEnd()  : bool
    getTag()  : string
    Gets the tag name associated with this token parser.
    parse()  : TwigNodeTryCatch
    Parses a token and returns a node.

    Methods

    getTag()

    Gets the tag name associated with this token parser.

    public getTag() : string
    Return values
    string

    The tag name

    
            
    On this page

    Search results