PHP Classes
elePHPant
Icontem

File: src/Cabin/Bridge/View/macros/custom_dirs.twig

Recommend this page to a friend!
  Classes of Scott Arciszewski  >  CMS Airship  >  src/Cabin/Bridge/View/macros/custom_dirs.twig  >  Download  
File: src/Cabin/Bridge/View/macros/custom_dirs.twig
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: CMS Airship
Content management system with security features
Author: By
Last change:
Date: 1 year ago
Size: 719 bytes
 

Contents

Class file image Download
{% macro dirTree(data, fullpath = "", cabin = "", depth = 0) %}
    <option {#
        #}{% if data.selected %}selected="selected"{% endif %} {#
        #}class="depth{{ depth|e('html_attr') }}" {#
        #}data-fullpath="{{
            (
                fullpath ~
                "/" ~
                data.url|e('url')
            )|e('html_attr')
        }}" {#
        #}data-cabin="{{ cabin|e('url') }}" {#
        #}value="{{ data.directoryid|e('html_attr') }}"{#
        #}>{{ data.url }}</option>
    {% if data.children %}
        {% for child in data.children %}
            {{ _self.dirTree(child, fullpath ~ "/" ~ data.url|e('url'), cabin, depth + 1) }}
        {% endfor %}
    {% endif %}
{% endmacro %}