aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/smarty/smarty/docs/programmers/api-functions/api-get-tags.md
blob: 7729b468bd21378946ec81f4a9f543b1dbc36e22 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
getTags()

return tags used by template

Description
===========

string

getTags

object

template

This function returns an array of tagname/attribute pairs for all tags
used by the template. It uses the following parameters:

-   `template` is the template object.

> **Note**
>
> This function is experimental.


    <?php
    include('Smarty.class.php');
    $smarty = new Smarty;

    // create template object
    $tpl = $smarty->createTemplate('index.tpl');

    // get tags
    $tags = $smarty->getTags($tpl);

    print_r($tags);

    ?>