Last active
March 4, 2016 19:21
-
-
Save webdevilopers/3029aaccf1b7ddbac48f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* SonataAdminBundle:CRUD:base_acl_macro.html.twig */ | |
class __TwigTemplate_50e0a0acb6692fad6ee6016b2f0882c3bfad1420f2afa41ee25fbcb5d97dcbb3 extends Twig_Template | |
{ | |
public function __construct(Twig_Environment $env) | |
{ | |
parent::__construct($env); | |
$this->parent = false; | |
$this->blocks = array( | |
); | |
} | |
protected function doDisplay(array $context, array $blocks = array()) | |
{ | |
// line 11 | |
echo " | |
"; | |
} | |
// line 12 | |
public function getrender_form($__form__ = null, $__permissions__ = null, $__td_type__ = null, $__admin__ = null, $__admin_pool__ = null, $__object__ = null, ...$__varargs__) | |
{ | |
$context = $this->env->mergeGlobals(array( | |
"form" => $__form__, | |
"permissions" => $__permissions__, | |
"td_type" => $__td_type__, | |
"admin" => $__admin__, | |
"admin_pool" => $__admin_pool__, | |
"object" => $__object__, | |
"varargs" => $__varargs__, | |
)); | |
$blocks = array(); | |
ob_start(); | |
try { | |
// line 13 | |
echo " <form class=\"form-horizontal\" | |
action=\""; | |
// line 14 | |
echo twig_escape_filter($this->env, $this->getAttribute((isset($context["admin"]) ? $context["admin"] : null), "generateUrl", array(0 => "acl", 1 => array("id" => $this->getAttribute((isset($context["admin"]) ? $context["admin"] : null), "id", array(0 => (isset($context["object"]) ? $context["object"] : null)), "method"), "uniqid" => $this->getAttribute((isset($context["admin"]) ? $context["admin"] : null), "uniqid", array()), "subclass" => $this->getAttribute($this->getAttribute((isset($context["app"]) ? $context["app"] : null), "request", array()), "get", array(0 => "subclass"), "method"))), "method"), "html", null, true); | |
echo "\" | |
"; | |
// line 15 | |
if ($this->getAttribute($this->getAttribute((isset($context["form"]) ? $context["form"] : null), "vars", array()), "multipart", array())) { | |
echo " enctype=\"multipart/form-data\""; | |
} | |
// line 16 | |
echo " method=\"POST\" | |
"; | |
// line 17 | |
if ( !$this->getAttribute((isset($context["admin_pool"]) ? $context["admin_pool"] : null), "getOption", array(0 => "html5_validate"), "method")) { | |
echo "novalidate=\"novalidate\""; | |
} | |
// line 18 | |
echo " > | |
"; | |
// line 19 | |
if ((twig_length_filter($this->env, $this->getAttribute($this->getAttribute((isset($context["form"]) ? $context["form"] : null), "vars", array()), "errors", array())) > 0)) { | |
// line 20 | |
echo " <div class=\"sonata-ba-form-error\"> | |
"; | |
// line 21 | |
echo $this->env->getExtension('form')->renderer->searchAndRenderBlock((isset($context["form"]) ? $context["form"] : null), 'errors'); | |
echo " | |
</div> | |
"; | |
} | |
// line 24 | |
echo " | |
<div class=\"box box-success\"> | |
<div class=\"body table-responsive no-padding\"> | |
<table class=\"table\"> | |
<colgroup> | |
<col style=\"width: 100%;\"/> | |
"; | |
// line 30 | |
$context['_parent'] = $context; | |
$context['_seq'] = twig_ensure_traversable((isset($context["permissions"]) ? $context["permissions"] : null)); | |
foreach ($context['_seq'] as $context["_key"] => $context["permission"]) { | |
// line 31 | |
echo " <col/> | |
"; | |
} | |
$_parent = $context['_parent']; | |
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['permission'], $context['_parent'], $context['loop']); | |
$context = array_intersect_key($context, $_parent) + $_parent; | |
// line 33 | |
echo " </colgroup> | |
"; | |
// line 35 | |
$context['_parent'] = $context; | |
$context['_seq'] = twig_ensure_traversable($this->getAttribute((isset($context["form"]) ? $context["form"] : null), "children", array())); | |
$context['loop'] = array( | |
'parent' => $context['_parent'], | |
'index0' => 0, | |
'index' => 1, | |
'first' => true, | |
); | |
foreach ($context['_seq'] as $context["_key"] => $context["child"]) { | |
if (($this->getAttribute($this->getAttribute($context["child"], "vars", array()), "name", array()) != "_token")) { | |
// line 36 | |
echo " "; | |
if ((($this->getAttribute($context["loop"], "index0", array()) == 0) || (($this->getAttribute($context["loop"], "index0", array()) % 10) == 0))) { | |
// line 37 | |
echo " <tr> | |
<th>"; | |
// line 38 | |
echo twig_escape_filter($this->env, $this->env->getExtension('translator')->trans((isset($context["td_type"]) ? $context["td_type"] : null), array(), "SonataAdminBundle"), "html", null, true); | |
echo "</th> | |
"; | |
// line 39 | |
$context['_parent'] = $context; | |
$context['_seq'] = twig_ensure_traversable((isset($context["permissions"]) ? $context["permissions"] : null)); | |
foreach ($context['_seq'] as $context["_key"] => $context["permission"]) { | |
// line 40 | |
echo " <th class=\"text-right\">"; | |
echo twig_escape_filter($this->env, $context["permission"], "html", null, true); | |
echo "</th> | |
"; | |
} | |
$_parent = $context['_parent']; | |
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['permission'], $context['_parent'], $context['loop']); | |
$context = array_intersect_key($context, $_parent) + $_parent; | |
// line 42 | |
echo " </tr> | |
"; | |
} | |
// line 44 | |
echo " | |
<tr> | |
<td> | |
"; | |
// line 47 | |
$context["typeChild"] = (($this->getAttribute($context["child"], "role", array(), "array", true, true)) ? ($this->getAttribute($context["child"], "role", array(), "array")) : ($this->getAttribute($context["child"], "user", array(), "array"))); | |
// line 48 | |
echo " "; | |
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute((isset($context["typeChild"]) ? $context["typeChild"] : null), "vars", array()), "value", array()), "html", null, true); | |
echo " | |
"; | |
// line 49 | |
echo $this->env->getExtension('form')->renderer->searchAndRenderBlock((isset($context["typeChild"]) ? $context["typeChild"] : null), 'widget'); | |
echo " | |
</td> | |
"; | |
// line 51 | |
$context['_parent'] = $context; | |
$context['_seq'] = twig_ensure_traversable((isset($context["permissions"]) ? $context["permissions"] : null)); | |
foreach ($context['_seq'] as $context["_key"] => $context["permission"]) { | |
// line 52 | |
echo " <td class=\"text-right\">"; | |
echo $this->env->getExtension('form')->renderer->searchAndRenderBlock($this->getAttribute($context["child"], $context["permission"], array(), "array"), 'widget', array("label" => false)); | |
echo "</td> | |
"; | |
} | |
$_parent = $context['_parent']; | |
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['permission'], $context['_parent'], $context['loop']); | |
$context = array_intersect_key($context, $_parent) + $_parent; | |
// line 54 | |
echo " </tr> | |
"; | |
++$context['loop']['index0']; | |
++$context['loop']['index']; | |
$context['loop']['first'] = false; | |
} | |
} | |
$_parent = $context['_parent']; | |
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['child'], $context['_parent'], $context['loop']); | |
$context = array_intersect_key($context, $_parent) + $_parent; | |
// line 56 | |
echo " </table> | |
</div> | |
</div> | |
"; | |
// line 60 | |
echo $this->env->getExtension('form')->renderer->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : null), "_token", array()), 'row'); | |
echo " | |
<div class=\"well well-small form-actions\"> | |
<input class=\"btn btn-primary\" type=\"submit\" name=\"btn_create_and_edit\" value=\""; | |
// line 63 | |
echo twig_escape_filter($this->env, $this->env->getExtension('translator')->trans("btn_update_acl", array(), "SonataAdminBundle"), "html", null, true); | |
echo "\"> | |
</div> | |
</form> | |
"; | |
} catch (Exception $e) { | |
ob_end_clean(); | |
throw $e; | |
} | |
return ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset()); | |
} | |
public function getTemplateName() | |
{ | |
return "SonataAdminBundle:CRUD:base_acl_macro.html.twig"; | |
} | |
public function isTraitable() | |
{ | |
return false; | |
} | |
public function getDebugInfo() | |
{ | |
return array ( 187 => 63, 181 => 60, 175 => 56, 164 => 54, 155 => 52, 151 => 51, 146 => 49, 141 => 48, 139 => 47, 134 => 44, 130 => 42, 121 => 40, 117 => 39, 113 => 38, 110 => 37, 107 => 36, 96 => 35, 92 => 33, 85 => 31, 81 => 30, 73 => 24, 67 => 21, 64 => 20, 62 => 19, 59 => 18, 55 => 17, 52 => 16, 48 => 15, 44 => 14, 41 => 13, 24 => 12, 19 => 11,); | |
} | |
} | |
/* {#*/ | |
/* */ | |
/* This file is part of the Sonata package.*/ | |
/* */ | |
/* (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>*/ | |
/* */ | |
/* For the full copyright and license information, please view the LICENSE*/ | |
/* file that was distributed with this source code.*/ | |
/* */ | |
/* #}*/ | |
/* */ | |
/* {% macro render_form(form, permissions, td_type, admin, admin_pool, object) %}*/ | |
/* <form class="form-horizontal"*/ | |
/* action="{{ admin.generateUrl('acl', {'id': admin.id(object), 'uniqid': admin.uniqid, 'subclass': app.request.get('subclass')}) }}"*/ | |
/* {% if form.vars.multipart %} enctype="multipart/form-data"{% endif %}*/ | |
/* method="POST"*/ | |
/* {% if not admin_pool.getOption('html5_validate') %}novalidate="novalidate"{% endif %}*/ | |
/* >*/ | |
/* {% if form.vars.errors|length > 0 %}*/ | |
/* <div class="sonata-ba-form-error">*/ | |
/* {{ form_errors(form) }}*/ | |
/* </div>*/ | |
/* {% endif %}*/ | |
/* */ | |
/* <div class="box box-success">*/ | |
/* <div class="body table-responsive no-padding">*/ | |
/* <table class="table">*/ | |
/* <colgroup>*/ | |
/* <col style="width: 100%;"/>*/ | |
/* {% for permission in permissions %}*/ | |
/* <col/>*/ | |
/* {% endfor %}*/ | |
/* </colgroup>*/ | |
/* */ | |
/* {% for child in form.children if child.vars.name != '_token' %}*/ | |
/* {% if loop.index0 == 0 or loop.index0 % 10 == 0 %}*/ | |
/* <tr>*/ | |
/* <th>{{ td_type|trans({}, 'SonataAdminBundle') }}</th>*/ | |
/* {% for permission in permissions %}*/ | |
/* <th class="text-right">{{ permission }}</th>*/ | |
/* {% endfor %}*/ | |
/* </tr>*/ | |
/* {% endif %}*/ | |
/* */ | |
/* <tr>*/ | |
/* <td>*/ | |
/* {% set typeChild = child['role'] is defined ? child['role'] : child['user'] %}*/ | |
/* {{ typeChild.vars.value }}*/ | |
/* {{ form_widget(typeChild) }}*/ | |
/* </td>*/ | |
/* {% for permission in permissions %}*/ | |
/* <td class="text-right">{{ form_widget(child[permission], { label: false }) }}</td>*/ | |
/* {% endfor %}*/ | |
/* </tr>*/ | |
/* {% endfor %}*/ | |
/* </table>*/ | |
/* </div>*/ | |
/* </div>*/ | |
/* */ | |
/* {{ form_row(form._token) }}*/ | |
/* */ | |
/* <div class="well well-small form-actions">*/ | |
/* <input class="btn btn-primary" type="submit" name="btn_create_and_edit" value="{{ 'btn_update_acl'|trans({}, 'SonataAdminBundle') }}">*/ | |
/* </div>*/ | |
/* </form>*/ | |
/* {% endmacro %}*/ | |
/* */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* SonataAdminBundle:CRUD:base_edit_form_macro.html.twig */ | |
class __TwigTemplate_c5e4314c747efeda06a4c9be65300c68e024e296f46c46d7e5b096e0363a605f extends Twig_Template | |
{ | |
public function __construct(Twig_Environment $env) | |
{ | |
parent::__construct($env); | |
$this->parent = false; | |
$this->blocks = array( | |
); | |
} | |
protected function doDisplay(array $context, array $blocks = array()) | |
{ | |
} | |
// line 1 | |
public function getrender_groups($__admin__ = null, $__form__ = null, $__groups__ = null, $__has_tab__ = null, ...$__varargs__) | |
{ | |
$context = $this->env->mergeGlobals(array( | |
"admin" => $__admin__, | |
"form" => $__form__, | |
"groups" => $__groups__, | |
"has_tab" => $__has_tab__, | |
"varargs" => $__varargs__, | |
)); | |
$blocks = array(); | |
ob_start(); | |
try { | |
// line 2 | |
echo " <div class=\"row\"> | |
"; | |
// line 4 | |
$context['_parent'] = $context; | |
$context['_seq'] = twig_ensure_traversable((isset($context["groups"]) ? $context["groups"] : null)); | |
foreach ($context['_seq'] as $context["_key"] => $context["code"]) { | |
// line 5 | |
echo " "; | |
$context["form_group"] = $this->getAttribute($this->getAttribute((isset($context["admin"]) ? $context["admin"] : null), "formgroups", array()), $context["code"], array(), "array"); | |
// line 6 | |
echo " | |
<div class=\""; | |
// line 7 | |
echo twig_escape_filter($this->env, (($this->getAttribute((isset($context["form_group"]) ? $context["form_group"] : null), "class", array(), "any", true, true)) ? (_twig_default_filter($this->getAttribute((isset($context["form_group"]) ? $context["form_group"] : null), "class", array()), "col-md-12")) : ("col-md-12")), "html", null, true); | |
echo "\"> | |
<div class=\""; | |
// line 8 | |
echo twig_escape_filter($this->env, $this->getAttribute((isset($context["form_group"]) ? $context["form_group"] : null), "box_class", array()), "html", null, true); | |
echo "\"> | |
<div class=\"box-header\"> | |
<h4 class=\"box-title\"> | |
"; | |
// line 11 | |
echo twig_escape_filter($this->env, $this->getAttribute((isset($context["admin"]) ? $context["admin"] : null), "trans", array(0 => $this->getAttribute((isset($context["form_group"]) ? $context["form_group"] : null), "name", array()), 1 => array(), 2 => $this->getAttribute((isset($context["form_group"]) ? $context["form_group"] : null), "translation_domain", array())), "method"), "html", null, true); | |
echo " | |
</h4> | |
</div> | |
"; | |
// line 15 | |
echo " <div class=\"box-body\"> | |
<div class=\"sonata-ba-collapsed-fields\"> | |
"; | |
// line 17 | |
if (($this->getAttribute((isset($context["form_group"]) ? $context["form_group"] : null), "description", array()) != false)) { | |
// line 18 | |
echo " <p>"; | |
echo $this->getAttribute((isset($context["form_group"]) ? $context["form_group"] : null), "description", array()); | |
echo "</p> | |
"; | |
} | |
// line 20 | |
echo " | |
"; | |
// line 21 | |
$context['_parent'] = $context; | |
$context['_seq'] = twig_ensure_traversable($this->getAttribute((isset($context["form_group"]) ? $context["form_group"] : null), "fields", array())); | |
$context['_iterated'] = false; | |
foreach ($context['_seq'] as $context["_key"] => $context["field_name"]) { | |
// line 22 | |
echo " "; | |
if ($this->getAttribute($this->getAttribute((isset($context["admin"]) ? $context["admin"] : null), "formfielddescriptions", array(), "any", false, true), $context["field_name"], array(), "array", true, true)) { | |
// line 23 | |
echo " "; | |
echo $this->env->getExtension('form')->renderer->searchAndRenderBlock($this->getAttribute((isset($context["form"]) ? $context["form"] : null), $context["field_name"], array(), "array"), 'row'); | |
echo " | |
"; | |
} | |
// line 25 | |
echo " "; | |
$context['_iterated'] = true; | |
} | |
if (!$context['_iterated']) { | |
// line 26 | |
echo " <em>"; | |
echo twig_escape_filter($this->env, $this->env->getExtension('translator')->trans("message_form_group_empty", array(), "SonataAdminBundle"), "html", null, true); | |
echo "</em> | |
"; | |
} | |
$_parent = $context['_parent']; | |
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['field_name'], $context['_parent'], $context['loop']); | |
$context = array_intersect_key($context, $_parent) + $_parent; | |
// line 28 | |
echo " </div> | |
</div> | |
"; | |
// line 31 | |
echo " </div> | |
</div> | |
"; | |
} | |
$_parent = $context['_parent']; | |
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['code'], $context['_parent'], $context['loop']); | |
$context = array_intersect_key($context, $_parent) + $_parent; | |
// line 34 | |
echo " </div> | |
"; | |
} catch (Exception $e) { | |
ob_end_clean(); | |
throw $e; | |
} | |
return ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset()); | |
} | |
public function getTemplateName() | |
{ | |
return "SonataAdminBundle:CRUD:base_edit_form_macro.html.twig"; | |
} | |
public function isTraitable() | |
{ | |
return false; | |
} | |
public function getDebugInfo() | |
{ | |
return array ( 121 => 34, 113 => 31, 109 => 28, 100 => 26, 95 => 25, 89 => 23, 86 => 22, 81 => 21, 78 => 20, 72 => 18, 70 => 17, 66 => 15, 60 => 11, 54 => 8, 50 => 7, 47 => 6, 44 => 5, 40 => 4, 36 => 2, 21 => 1,); | |
} | |
} | |
/* {% macro render_groups(admin, form, groups, has_tab) %}*/ | |
/* <div class="row">*/ | |
/* */ | |
/* {% for code in groups %}*/ | |
/* {% set form_group = admin.formgroups[code] %}*/ | |
/* */ | |
/* <div class="{{ form_group.class | default('col-md-12') }}">*/ | |
/* <div class="{{ form_group.box_class }}">*/ | |
/* <div class="box-header">*/ | |
/* <h4 class="box-title">*/ | |
/* {{ admin.trans(form_group.name, {}, form_group.translation_domain) }}*/ | |
/* </h4>*/ | |
/* </div>*/ | |
/* {#<div class="box{% if loop.first %} in{% endif %}" id="{{ admin.uniqid }}_{{ loop.index }}">#}*/ | |
/* <div class="box-body">*/ | |
/* <div class="sonata-ba-collapsed-fields">*/ | |
/* {% if form_group.description != false %}*/ | |
/* <p>{{ form_group.description|raw }}</p>*/ | |
/* {% endif %}*/ | |
/* */ | |
/* {% for field_name in form_group.fields %}*/ | |
/* {% if admin.formfielddescriptions[field_name] is defined %}*/ | |
/* {{ form_row(form[field_name])}}*/ | |
/* {% endif %}*/ | |
/* {% else %}*/ | |
/* <em>{{ 'message_form_group_empty'|trans({}, 'SonataAdminBundle') }}</em>*/ | |
/* {% endfor %}*/ | |
/* </div>*/ | |
/* </div>*/ | |
/* {#</div>#}*/ | |
/* </div>*/ | |
/* </div>*/ | |
/* {% endfor %}*/ | |
/* </div>*/ | |
/* {% endmacro %}*/ | |
/* */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* knp_menu.html.twig */ | |
class __TwigTemplate_39628da9ead3065e42ef5d23504137dd2de063425bf0a27bbc764c4f4c482de0 extends Twig_Template | |
{ | |
public function __construct(Twig_Environment $env) | |
{ | |
parent::__construct($env); | |
// line 1 | |
$this->parent = $this->loadTemplate("knp_menu_base.html.twig", "knp_menu.html.twig", 1); | |
$this->blocks = array( | |
'compressed_root' => array($this, 'block_compressed_root'), | |
'root' => array($this, 'block_root'), | |
'list' => array($this, 'block_list'), | |
'children' => array($this, 'block_children'), | |
'item' => array($this, 'block_item'), | |
'linkElement' => array($this, 'block_linkElement'), | |
'spanElement' => array($this, 'block_spanElement'), | |
'label' => array($this, 'block_label'), | |
); | |
} | |
protected function doGetParent(array $context) | |
{ | |
return "knp_menu_base.html.twig"; | |
} | |
protected function doDisplay(array $context, array $blocks = array()) | |
{ | |
$this->parent->display($context, array_merge($this->blocks, $blocks)); | |
} | |
// line 11 | |
public function block_compressed_root($context, array $blocks = array()) | |
{ | |
// line 12 | |
ob_start(); | |
// line 13 | |
$this->displayBlock("root", $context, $blocks); | |
echo " | |
"; | |
echo trim(preg_replace('/>\s+</', '><', ob_get_clean())); | |
} | |
// line 17 | |
public function block_root($context, array $blocks = array()) | |
{ | |
// line 18 | |
$context["listAttributes"] = $this->getAttribute((isset($context["item"]) ? $context["item"] : null), "childrenAttributes", array()); | |
// line 19 | |
$this->displayBlock("list", $context, $blocks); | |
} | |
// line 22 | |
public function block_list($context, array $blocks = array()) | |
{ | |
// line 23 | |
if ((($this->getAttribute((isset($context["item"]) ? $context["item"] : null), "hasChildren", array()) && !($this->getAttribute((isset($context["options"]) ? $context["options"] : null), "depth", array()) === 0)) && $this->getAttribute((isset($context["item"]) ? $context["item"] : null), "displayChildren", array()))) { | |
// line 24 | |
echo " "; | |
$context["knp_menu"] = $this; | |
// line 25 | |
echo " <ul"; | |
echo $context["knp_menu"]->getattributes((isset($context["listAttributes"]) ? $context["listAttributes"] : null)); | |
echo "> | |
"; | |
// line 26 | |
$this->displayBlock("children", $context, $blocks); | |
echo " | |
</ul> | |
"; | |
} | |
} | |
// line 31 | |
public function block_children($context, array $blocks = array()) | |
{ | |
// line 33 | |
$context["currentOptions"] = (isset($context["options"]) ? $context["options"] : null); | |
// line 34 | |
$context["currentItem"] = (isset($context["item"]) ? $context["item"] : null); | |
// line 36 | |
if ( !(null === $this->getAttribute((isset($context["options"]) ? $context["options"] : null), "depth", array()))) { | |
// line 37 | |
$context["options"] = twig_array_merge((isset($context["options"]) ? $context["options"] : null), array("depth" => ($this->getAttribute((isset($context["currentOptions"]) ? $context["currentOptions"] : null), "depth", array()) - 1))); | |
} | |
// line 40 | |
if (( !(null === $this->getAttribute((isset($context["options"]) ? $context["options"] : null), "matchingDepth", array())) && ($this->getAttribute((isset($context["options"]) ? $context["options"] : null), "matchingDepth", array()) > 0))) { | |
// line 41 | |
$context["options"] = twig_array_merge((isset($context["options"]) ? $context["options"] : null), array("matchingDepth" => ($this->getAttribute((isset($context["currentOptions"]) ? $context["currentOptions"] : null), "matchingDepth", array()) - 1))); | |
} | |
// line 43 | |
$context['_parent'] = $context; | |
$context['_seq'] = twig_ensure_traversable($this->getAttribute((isset($context["currentItem"]) ? $context["currentItem"] : null), "children", array())); | |
$context['loop'] = array( | |
'parent' => $context['_parent'], | |
'index0' => 0, | |
'index' => 1, | |
'first' => true, | |
); | |
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof Countable)) { | |
$length = count($context['_seq']); | |
$context['loop']['revindex0'] = $length - 1; | |
$context['loop']['revindex'] = $length; | |
$context['loop']['length'] = $length; | |
$context['loop']['last'] = 1 === $length; | |
} | |
foreach ($context['_seq'] as $context["_key"] => $context["item"]) { | |
// line 44 | |
echo " "; | |
$this->displayBlock("item", $context, $blocks); | |
echo " | |
"; | |
++$context['loop']['index0']; | |
++$context['loop']['index']; | |
$context['loop']['first'] = false; | |
if (isset($context['loop']['length'])) { | |
--$context['loop']['revindex0']; | |
--$context['loop']['revindex']; | |
$context['loop']['last'] = 0 === $context['loop']['revindex0']; | |
} | |
} | |
$_parent = $context['_parent']; | |
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']); | |
$context = array_intersect_key($context, $_parent) + $_parent; | |
// line 47 | |
$context["item"] = (isset($context["currentItem"]) ? $context["currentItem"] : null); | |
// line 48 | |
$context["options"] = (isset($context["currentOptions"]) ? $context["currentOptions"] : null); | |
} | |
// line 51 | |
public function block_item($context, array $blocks = array()) | |
{ | |
// line 52 | |
if ($this->getAttribute((isset($context["item"]) ? $context["item"] : null), "displayed", array())) { | |
// line 54 | |
$context["classes"] = (( !twig_test_empty($this->getAttribute((isset($context["item"]) ? $context["item"] : null), "attribute", array(0 => "class"), "method"))) ? (array(0 => $this->getAttribute((isset($context["item"]) ? $context["item"] : null), "attribute", array(0 => "class"), "method"))) : (array())); | |
// line 55 | |
if ($this->getAttribute((isset($context["matcher"]) ? $context["matcher"] : null), "isCurrent", array(0 => (isset($context["item"]) ? $context["item"] : null)), "method")) { | |
// line 56 | |
$context["classes"] = twig_array_merge((isset($context["classes"]) ? $context["classes"] : null), array(0 => $this->getAttribute((isset($context["options"]) ? $context["options"] : null), "currentClass", array()))); | |
} elseif ($this->getAttribute( // line 57 | |
(isset($context["matcher"]) ? $context["matcher"] : null), "isAncestor", array(0 => (isset($context["item"]) ? $context["item"] : null), 1 => $this->getAttribute((isset($context["options"]) ? $context["options"] : null), "matchingDepth", array())), "method")) { | |
// line 58 | |
$context["classes"] = twig_array_merge((isset($context["classes"]) ? $context["classes"] : null), array(0 => $this->getAttribute((isset($context["options"]) ? $context["options"] : null), "ancestorClass", array()))); | |
} | |
// line 60 | |
if ($this->getAttribute((isset($context["item"]) ? $context["item"] : null), "actsLikeFirst", array())) { | |
// line 61 | |
$context["classes"] = twig_array_merge((isset($context["classes"]) ? $context["classes"] : null), array(0 => $this->getAttribute((isset($context["options"]) ? $context["options"] : null), "firstClass", array()))); | |
} | |
// line 63 | |
if ($this->getAttribute((isset($context["item"]) ? $context["item"] : null), "actsLikeLast", array())) { | |
// line 64 | |
$context["classes"] = twig_array_merge((isset($context["classes"]) ? $context["classes"] : null), array(0 => $this->getAttribute((isset($context["options"]) ? $context["options"] : null), "lastClass", array()))); | |
} | |
// line 66 | |
echo " | |
"; | |
// line 68 | |
echo " "; | |
if (($this->getAttribute((isset($context["item"]) ? $context["item"] : null), "hasChildren", array()) && !($this->getAttribute((isset($context["options"]) ? $context["options"] : null), "depth", array()) === 0))) { | |
// line 69 | |
echo " "; | |
if (( !twig_test_empty($this->getAttribute((isset($context["options"]) ? $context["options"] : null), "branch_class", array())) && $this->getAttribute((isset($context["item"]) ? $context["item"] : null), "displayChildren", array()))) { | |
// line 70 | |
$context["classes"] = twig_array_merge((isset($context["classes"]) ? $context["classes"] : null), array(0 => $this->getAttribute((isset($context["options"]) ? $context["options"] : null), "branch_class", array()))); | |
// line 71 | |
echo " "; | |
} | |
// line 72 | |
echo " "; | |
} elseif ( !twig_test_empty($this->getAttribute((isset($context["options"]) ? $context["options"] : null), "leaf_class", array()))) { | |
// line 73 | |
$context["classes"] = twig_array_merge((isset($context["classes"]) ? $context["classes"] : null), array(0 => $this->getAttribute((isset($context["options"]) ? $context["options"] : null), "leaf_class", array()))); | |
} | |
// line 76 | |
$context["attributes"] = $this->getAttribute((isset($context["item"]) ? $context["item"] : null), "attributes", array()); | |
// line 77 | |
if ( !twig_test_empty((isset($context["classes"]) ? $context["classes"] : null))) { | |
// line 78 | |
$context["attributes"] = twig_array_merge((isset($context["attributes"]) ? $context["attributes"] : null), array("class" => twig_join_filter((isset($context["classes"]) ? $context["classes"] : null), " "))); | |
} | |
// line 81 | |
echo " "; | |
$context["knp_menu"] = $this; | |
// line 82 | |
echo " <li"; | |
echo $context["knp_menu"]->getattributes((isset($context["attributes"]) ? $context["attributes"] : null)); | |
echo ">"; | |
// line 83 | |
if (( !twig_test_empty($this->getAttribute((isset($context["item"]) ? $context["item"] : null), "uri", array())) && ( !$this->getAttribute((isset($context["matcher"]) ? $context["matcher"] : null), "isCurrent", array(0 => (isset($context["item"]) ? $context["item"] : null)), "method") || $this->getAttribute((isset($context["options"]) ? $context["options"] : null), "currentAsLink", array())))) { | |
// line 84 | |
echo " "; | |
$this->displayBlock("linkElement", $context, $blocks); | |
} else { | |
// line 86 | |
echo " "; | |
$this->displayBlock("spanElement", $context, $blocks); | |
} | |
// line 89 | |
$context["childrenClasses"] = (( !twig_test_empty($this->getAttribute((isset($context["item"]) ? $context["item"] : null), "childrenAttribute", array(0 => "class"), "method"))) ? (array(0 => $this->getAttribute((isset($context["item"]) ? $context["item"] : null), "childrenAttribute", array(0 => "class"), "method"))) : (array())); | |
// line 90 | |
$context["childrenClasses"] = twig_array_merge((isset($context["childrenClasses"]) ? $context["childrenClasses"] : null), array(0 => ("menu_level_" . $this->getAttribute((isset($context["item"]) ? $context["item"] : null), "level", array())))); | |
// line 91 | |
$context["listAttributes"] = twig_array_merge($this->getAttribute((isset($context["item"]) ? $context["item"] : null), "childrenAttributes", array()), array("class" => twig_join_filter((isset($context["childrenClasses"]) ? $context["childrenClasses"] : null), " "))); | |
// line 92 | |
echo " "; | |
$this->displayBlock("list", $context, $blocks); | |
echo " | |
</li> | |
"; | |
} | |
} | |
// line 97 | |
public function block_linkElement($context, array $blocks = array()) | |
{ | |
$context["knp_menu"] = $this; | |
echo "<a href=\""; | |
echo twig_escape_filter($this->env, $this->getAttribute((isset($context["item"]) ? $context["item"] : null), "uri", array()), "html", null, true); | |
echo "\""; | |
echo $context["knp_menu"]->getattributes($this->getAttribute((isset($context["item"]) ? $context["item"] : null), "linkAttributes", array())); | |
echo ">"; | |
$this->displayBlock("label", $context, $blocks); | |
echo "</a>"; | |
} | |
// line 99 | |
public function block_spanElement($context, array $blocks = array()) | |
{ | |
$context["knp_menu"] = $this; | |
echo "<span"; | |
echo $context["knp_menu"]->getattributes($this->getAttribute((isset($context["item"]) ? $context["item"] : null), "labelAttributes", array())); | |
echo ">"; | |
$this->displayBlock("label", $context, $blocks); | |
echo "</span>"; | |
} | |
// line 101 | |
public function block_label($context, array $blocks = array()) | |
{ | |
if (($this->getAttribute((isset($context["options"]) ? $context["options"] : null), "allow_safe_labels", array()) && $this->getAttribute((isset($context["item"]) ? $context["item"] : null), "getExtra", array(0 => "safe_label", 1 => false), "method"))) { | |
echo $this->getAttribute((isset($context["item"]) ? $context["item"] : null), "label", array()); | |
} else { | |
echo twig_escape_filter($this->env, $this->getAttribute((isset($context["item"]) ? $context["item"] : null), "label", array()), "html", null, true); | |
} | |
} | |
// line 3 | |
public function getattributes($__attributes__ = null, ...$__varargs__) | |
{ | |
$context = $this->env->mergeGlobals(array( | |
"attributes" => $__attributes__, | |
"varargs" => $__varargs__, | |
)); | |
$blocks = array(); | |
ob_start(); | |
try { | |
// line 4 | |
$context['_parent'] = $context; | |
$context['_seq'] = twig_ensure_traversable((isset($context["attributes"]) ? $context["attributes"] : null)); | |
foreach ($context['_seq'] as $context["name"] => $context["value"]) { | |
// line 5 | |
if (( !(null === $context["value"]) && !($context["value"] === false))) { | |
// line 6 | |
echo sprintf(" %s=\"%s\"", $context["name"], ((($context["value"] === true)) ? (twig_escape_filter($this->env, $context["name"])) : (twig_escape_filter($this->env, $context["value"])))); | |
} | |
} | |
$_parent = $context['_parent']; | |
unset($context['_seq'], $context['_iterated'], $context['name'], $context['value'], $context['_parent'], $context['loop']); | |
$context = array_intersect_key($context, $_parent) + $_parent; | |
} catch (Exception $e) { | |
ob_end_clean(); | |
throw $e; | |
} | |
return ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset()); | |
} | |
public function getTemplateName() | |
{ | |
return "knp_menu.html.twig"; | |
} | |
public function isTraitable() | |
{ | |
return false; | |
} | |
public function getDebugInfo() | |
{ | |
return array ( 271 => 6, 269 => 5, 265 => 4, 253 => 3, 243 => 101, 232 => 99, 219 => 97, 210 => 92, 208 => 91, 206 => 90, 204 => 89, 200 => 86, 196 => 84, 194 => 83, 190 => 82, 187 => 81, 184 => 78, 182 => 77, 180 => 76, 177 => 73, 174 => 72, 171 => 71, 169 => 70, 166 => 69, 163 => 68, 160 => 66, 157 => 64, 155 => 63, 152 => 61, 150 => 60, 147 => 58, 145 => 57, 143 => 56, 141 => 55, 139 => 54, 137 => 52, 134 => 51, 130 => 48, 128 => 47, 111 => 44, 94 => 43, 91 => 41, 89 => 40, 86 => 37, 84 => 36, 82 => 34, 80 => 33, 77 => 31, 69 => 26, 64 => 25, 61 => 24, 59 => 23, 56 => 22, 52 => 19, 50 => 18, 47 => 17, 40 => 13, 38 => 12, 35 => 11, 11 => 1,); | |
} | |
} | |
/* {% extends 'knp_menu_base.html.twig' %}*/ | |
/* */ | |
/* {% macro attributes(attributes) %}*/ | |
/* {% for name, value in attributes %}*/ | |
/* {%- if value is not none and value is not same as(false) -%}*/ | |
/* {{- ' %s="%s"'|format(name, value is same as(true) ? name|e : value|e)|raw -}}*/ | |
/* {%- endif -%}*/ | |
/* {%- endfor -%}*/ | |
/* {% endmacro %}*/ | |
/* */ | |
/* {% block compressed_root %}*/ | |
/* {% spaceless %}*/ | |
/* {{ block('root') }}*/ | |
/* {% endspaceless %}*/ | |
/* {% endblock %}*/ | |
/* */ | |
/* {% block root %}*/ | |
/* {% set listAttributes = item.childrenAttributes %}*/ | |
/* {{ block('list') -}}*/ | |
/* {% endblock %}*/ | |
/* */ | |
/* {% block list %}*/ | |
/* {% if item.hasChildren and options.depth is not same as(0) and item.displayChildren %}*/ | |
/* {% import _self as knp_menu %}*/ | |
/* <ul{{ knp_menu.attributes(listAttributes) }}>*/ | |
/* {{ block('children') }}*/ | |
/* </ul>*/ | |
/* {% endif %}*/ | |
/* {% endblock %}*/ | |
/* */ | |
/* {% block children %}*/ | |
/* {# save current variables #}*/ | |
/* {% set currentOptions = options %}*/ | |
/* {% set currentItem = item %}*/ | |
/* {# update the depth for children #}*/ | |
/* {% if options.depth is not none %}*/ | |
/* {% set options = options|merge({'depth': currentOptions.depth - 1}) %}*/ | |
/* {% endif %}*/ | |
/* {# update the matchingDepth for children #}*/ | |
/* {% if options.matchingDepth is not none and options.matchingDepth > 0 %}*/ | |
/* {% set options = options|merge({'matchingDepth': currentOptions.matchingDepth - 1}) %}*/ | |
/* {% endif %}*/ | |
/* {% for item in currentItem.children %}*/ | |
/* {{ block('item') }}*/ | |
/* {% endfor %}*/ | |
/* {# restore current variables #}*/ | |
/* {% set item = currentItem %}*/ | |
/* {% set options = currentOptions %}*/ | |
/* {% endblock %}*/ | |
/* */ | |
/* {% block item %}*/ | |
/* {% if item.displayed %}*/ | |
/* {# building the class of the item #}*/ | |
/* {%- set classes = item.attribute('class') is not empty ? [item.attribute('class')] : [] %}*/ | |
/* {%- if matcher.isCurrent(item) %}*/ | |
/* {%- set classes = classes|merge([options.currentClass]) %}*/ | |
/* {%- elseif matcher.isAncestor(item, options.matchingDepth) %}*/ | |
/* {%- set classes = classes|merge([options.ancestorClass]) %}*/ | |
/* {%- endif %}*/ | |
/* {%- if item.actsLikeFirst %}*/ | |
/* {%- set classes = classes|merge([options.firstClass]) %}*/ | |
/* {%- endif %}*/ | |
/* {%- if item.actsLikeLast %}*/ | |
/* {%- set classes = classes|merge([options.lastClass]) %}*/ | |
/* {%- endif %}*/ | |
/* */ | |
/* {# Mark item as "leaf" (no children) or as "branch" (has children that are displayed) #}*/ | |
/* {% if item.hasChildren and options.depth is not same as(0) %}*/ | |
/* {% if options.branch_class is not empty and item.displayChildren %}*/ | |
/* {%- set classes = classes|merge([options.branch_class]) %}*/ | |
/* {% endif %}*/ | |
/* {% elseif options.leaf_class is not empty %}*/ | |
/* {%- set classes = classes|merge([options.leaf_class]) %}*/ | |
/* {%- endif %}*/ | |
/* */ | |
/* {%- set attributes = item.attributes %}*/ | |
/* {%- if classes is not empty %}*/ | |
/* {%- set attributes = attributes|merge({'class': classes|join(' ')}) %}*/ | |
/* {%- endif %}*/ | |
/* {# displaying the item #}*/ | |
/* {% import _self as knp_menu %}*/ | |
/* <li{{ knp_menu.attributes(attributes) }}>*/ | |
/* {%- if item.uri is not empty and (not matcher.isCurrent(item) or options.currentAsLink) %}*/ | |
/* {{ block('linkElement') }}*/ | |
/* {%- else %}*/ | |
/* {{ block('spanElement') }}*/ | |
/* {%- endif %}*/ | |
/* {# render the list of children#}*/ | |
/* {%- set childrenClasses = item.childrenAttribute('class') is not empty ? [item.childrenAttribute('class')] : [] %}*/ | |
/* {%- set childrenClasses = childrenClasses|merge(['menu_level_' ~ item.level]) %}*/ | |
/* {%- set listAttributes = item.childrenAttributes|merge({'class': childrenClasses|join(' ') }) %}*/ | |
/* {{ block('list') }}*/ | |
/* </li>*/ | |
/* {% endif %}*/ | |
/* {% endblock %}*/ | |
/* */ | |
/* {% block linkElement %}{% import _self as knp_menu %}<a href="{{ item.uri }}"{{ knp_menu.attributes(item.linkAttributes) }}>{{ block('label') }}</a>{% endblock %}*/ | |
/* */ | |
/* {% block spanElement %}{% import _self as knp_menu %}<span{{ knp_menu.attributes(item.labelAttributes) }}>{{ block('label') }}</span>{% endblock %}*/ | |
/* */ | |
/* {% block label %}{% if options.allow_safe_labels and item.getExtra('safe_label', false) %}{{ item.label|raw }}{% else %}{{ item.label }}{% endif %}{% endblock %}*/ | |
/* */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* SonataAdminBundle:CRUD:tree.html.twig */ | |
class __TwigTemplate_e72ab41e31636263f870fe9c61e49c8da51d54be681662d0c7e746852679dcf8 extends Twig_Template | |
{ | |
public function __construct(Twig_Environment $env) | |
{ | |
parent::__construct($env); | |
// line 16 | |
$this->parent = $this->loadTemplate("SonataAdminBundle:CRUD:base_list.html.twig", "SonataAdminBundle:CRUD:tree.html.twig", 16); | |
$this->blocks = array( | |
'tab_menu' => array($this, 'block_tab_menu'), | |
'list_table' => array($this, 'block_list_table'), | |
); | |
} | |
protected function doGetParent(array $context) | |
{ | |
return "SonataAdminBundle:CRUD:base_list.html.twig"; | |
} | |
protected function doDisplay(array $context, array $blocks = array()) | |
{ | |
// line 18 | |
$context["tree"] = $this; | |
// line 16 | |
$this->parent->display($context, array_merge($this->blocks, $blocks)); | |
} | |
// line 40 | |
public function block_tab_menu($context, array $blocks = array()) | |
{ | |
// line 41 | |
echo " "; | |
$this->loadTemplate("SonataAdminBundle:CRUD:list_tab_menu.html.twig", "SonataAdminBundle:CRUD:tree.html.twig", 41)->display(array("mode" => "tree", "action" => // line 43 | |
(isset($context["action"]) ? $context["action"] : null), "admin" => // line 44 | |
(isset($context["admin"]) ? $context["admin"] : null))); | |
} | |
// line 48 | |
public function block_list_table($context, array $blocks = array()) | |
{ | |
// line 49 | |
echo " <div class=\"col-xs-12 col-md-12\"> | |
<div class=\"box box-primary\"> | |
<div class=\"box-header\"> | |
<h1 class=\"box-title\"> | |
"; | |
// line 53 | |
echo twig_escape_filter($this->env, $this->getAttribute((isset($context["admin"]) ? $context["admin"] : null), "trans", array(0 => "element.tree_site_label"), "method"), "html", null, true); | |
echo " | |
<div class=\"btn-group\"> | |
<button type=\"button\" class=\"btn btn-default dropdown-toggle\" data-toggle=\"dropdown\"> | |
<strong class=\"text-info\">"; | |
// line 56 | |
echo twig_escape_filter($this->env, $this->getAttribute((isset($context["currentSite"]) ? $context["currentSite"] : null), "name", array()), "html", null, true); | |
echo "</strong> <span class=\"caret\"></span> | |
</button> | |
<ul class=\"dropdown-menu\" role=\"menu\"> | |
"; | |
// line 59 | |
$context['_parent'] = $context; | |
$context['_seq'] = twig_ensure_traversable((isset($context["contexts"]) ? $context["contexts"] : null)); | |
foreach ($context['_seq'] as $context["_key"] => $context["context"]) { | |
// line 60 | |
echo " <li> | |
<a href=\""; | |
// line 61 | |
echo twig_escape_filter($this->env, $this->getAttribute((isset($context["admin"]) ? $context["admin"] : null), "generateUrl", array(0 => "tree", 1 => array("context" => $this->getAttribute($context["context"], "id", array()))), "method"), "html", null, true); | |
echo "\"> | |
"; | |
// line 62 | |
if (((isset($context["currentContext"]) ? $context["currentContext"] : null) && ($this->getAttribute($context["context"], "id", array()) == $this->getAttribute((isset($context["currentContext"]) ? $context["currentContext"] : null), "id", array())))) { | |
// line 63 | |
echo " <span class=\"pull-right\"> | |
<i class=\"fa fa-check\"></i> | |
</span> | |
"; | |
} | |
// line 67 | |
echo " "; | |
echo twig_escape_filter($this->env, $this->getAttribute((isset($context["site"]) ? $context["site"] : null), "name", array()), "html", null, true); | |
echo " | |
</a> | |
</li> | |
"; | |
} | |
$_parent = $context['_parent']; | |
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['context'], $context['_parent'], $context['loop']); | |
$context = array_intersect_key($context, $_parent) + $_parent; | |
// line 71 | |
echo " </ul> | |
</div> | |
</h1> | |
</div> | |
<div class=\"box-content\"> | |
"; | |
// line 76 | |
echo $context["tree"]->getnavigate_child((isset($context["collection"]) ? $context["collection"] : null), (isset($context["admin"]) ? $context["admin"] : null), true); | |
echo " | |
</div> | |
</div> | |
</div> | |
"; | |
} | |
// line 19 | |
public function getnavigate_child($__collection__ = null, $__admin__ = null, $__root__ = null, ...$__varargs__) | |
{ | |
$context = $this->env->mergeGlobals(array( | |
"collection" => $__collection__, | |
"admin" => $__admin__, | |
"root" => $__root__, | |
"varargs" => $__varargs__, | |
)); | |
$blocks = array(); | |
ob_start(); | |
try { | |
// line 20 | |
echo " <ul"; | |
if ((isset($context["root"]) ? $context["root"] : null)) { | |
echo " class=\"sonata-tree\""; | |
} | |
echo "> | |
"; | |
// line 21 | |
$context['_parent'] = $context; | |
$context['_seq'] = twig_ensure_traversable((isset($context["collection"]) ? $context["collection"] : null)); | |
foreach ($context['_seq'] as $context["_key"] => $context["element"]) { | |
if ( !(isset($context["root"]) ? $context["root"] : null)) { | |
// line 22 | |
echo " <li> | |
<div class=\"sonata-tree__item\"> | |
"; | |
// line 24 | |
if ($this->getAttribute($context["element"], "parent", array())) { | |
echo "<i class=\"fa fa-caret-right\"></i>"; | |
} | |
// line 25 | |
echo " <i class=\"fa fa-code\"></i> | |
<a class=\"sonata-tree__item__edit\" href=\""; | |
// line 26 | |
echo twig_escape_filter($this->env, $this->getAttribute((isset($context["admin"]) ? $context["admin"] : null), "generateObjectUrl", array(0 => "edit", 1 => $context["element"]), "method"), "html", null, true); | |
echo "\">"; | |
echo twig_escape_filter($this->env, $this->getAttribute($context["element"], "name", array()), "html", null, true); | |
echo "</a> | |
<i class=\"text-muted\">"; | |
// line 27 | |
echo twig_escape_filter($this->env, $this->getAttribute($context["element"], "description", array()), "html", null, true); | |
echo "</i> | |
<a class=\"label label-default pull-right\" href=\""; | |
// line 28 | |
echo twig_escape_filter($this->env, $this->getAttribute((isset($context["admin"]) ? $context["admin"] : null), "generateObjectUrl", array(0 => "edit", 1 => $context["element"]), "method"), "html", null, true); | |
echo "\">edit <i class=\"fa fa-magic\"></i></a> | |
"; | |
// line 29 | |
if (true) { | |
echo "<span class=\"label label-warning pull-right\">true</span>"; | |
} | |
// line 30 | |
echo " </div> | |
"; | |
// line 32 | |
if (twig_length_filter($this->env, $this->getAttribute($context["element"], "children", array()))) { | |
// line 33 | |
echo " "; | |
echo $this->getAttribute($this, "navigate_child", array(0 => $this->getAttribute($context["element"], "children", array()), 1 => (isset($context["admin"]) ? $context["admin"] : null), 2 => false), "method"); | |
echo " | |
"; | |
} | |
// line 35 | |
echo " </li> | |
"; | |
} | |
} | |
$_parent = $context['_parent']; | |
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['element'], $context['_parent'], $context['loop']); | |
$context = array_intersect_key($context, $_parent) + $_parent; | |
// line 37 | |
echo " </ul> | |
"; | |
} catch (Exception $e) { | |
ob_end_clean(); | |
throw $e; | |
} | |
return ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset()); | |
} | |
public function getTemplateName() | |
{ | |
return "SonataAdminBundle:CRUD:tree.html.twig"; | |
} | |
public function isTraitable() | |
{ | |
return false; | |
} | |
public function getDebugInfo() | |
{ | |
return array ( 184 => 37, 176 => 35, 170 => 33, 168 => 32, 164 => 30, 160 => 29, 156 => 28, 152 => 27, 146 => 26, 143 => 25, 139 => 24, 135 => 22, 130 => 21, 123 => 20, 109 => 19, 100 => 76, 93 => 71, 82 => 67, 76 => 63, 74 => 62, 70 => 61, 67 => 60, 63 => 59, 57 => 56, 51 => 53, 45 => 49, 42 => 48, 38 => 44, 37 => 43, 35 => 41, 32 => 40, 28 => 16, 26 => 18, 11 => 16,); | |
} | |
} | |
/* {#*/ | |
/* */ | |
/* This file is part of the Sonata package.*/ | |
/* */ | |
/* (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>*/ | |
/* */ | |
/* For the full copyright and license information, please view the LICENSE*/ | |
/* file that was distributed with this source code.*/ | |
/* */ | |
/* #}*/ | |
/* */ | |
/* {#*/ | |
/* This template is not used at all, it is just a template that you can use to create*/ | |
/* your own custom tree view.*/ | |
/* #}*/ | |
/* {% extends 'SonataAdminBundle:CRUD:base_list.html.twig' %}*/ | |
/* */ | |
/* {% import _self as tree %}*/ | |
/* {% macro navigate_child(collection, admin, root) %}*/ | |
/* <ul{% if root %} class="sonata-tree"{% endif %}>*/ | |
/* {% for element in collection if not root %}*/ | |
/* <li>*/ | |
/* <div class="sonata-tree__item">*/ | |
/* {% if element.parent %}<i class="fa fa-caret-right"></i>{% endif %}*/ | |
/* <i class="fa fa-code"></i>*/ | |
/* <a class="sonata-tree__item__edit" href="{{ admin.generateObjectUrl('edit', element) }}">{{ element.name }}</a>*/ | |
/* <i class="text-muted">{{ element.description }}</i>*/ | |
/* <a class="label label-default pull-right" href="{{ admin.generateObjectUrl('edit', element) }}">edit <i class="fa fa-magic"></i></a>*/ | |
/* {% if true %}<span class="label label-warning pull-right">true</span>{% endif %}*/ | |
/* </div>*/ | |
/* */ | |
/* {% if element.children|length %}*/ | |
/* {{ _self.navigate_child(element.children, admin, false) }}*/ | |
/* {% endif %}*/ | |
/* </li>*/ | |
/* {% endfor %}*/ | |
/* </ul>*/ | |
/* {% endmacro %}*/ | |
/* */ | |
/* {% block tab_menu %}*/ | |
/* {% include 'SonataAdminBundle:CRUD:list_tab_menu.html.twig' with {*/ | |
/* 'mode': 'tree',*/ | |
/* 'action': action,*/ | |
/* 'admin': admin,*/ | |
/* } only %}*/ | |
/* {% endblock %}*/ | |
/* */ | |
/* {% block list_table %}*/ | |
/* <div class="col-xs-12 col-md-12">*/ | |
/* <div class="box box-primary">*/ | |
/* <div class="box-header">*/ | |
/* <h1 class="box-title">*/ | |
/* {{ admin.trans('element.tree_site_label') }}*/ | |
/* <div class="btn-group">*/ | |
/* <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">*/ | |
/* <strong class="text-info">{{ currentSite.name }}</strong> <span class="caret"></span>*/ | |
/* </button>*/ | |
/* <ul class="dropdown-menu" role="menu">*/ | |
/* {% for context in contexts %}*/ | |
/* <li>*/ | |
/* <a href="{{ admin.generateUrl('tree', { 'context': context.id }) }}">*/ | |
/* {% if currentContext and context.id == currentContext.id %}*/ | |
/* <span class="pull-right">*/ | |
/* <i class="fa fa-check"></i>*/ | |
/* </span>*/ | |
/* {% endif %}*/ | |
/* {{ site.name }}*/ | |
/* </a>*/ | |
/* </li>*/ | |
/* {% endfor%}*/ | |
/* </ul>*/ | |
/* </div>*/ | |
/* </h1>*/ | |
/* </div>*/ | |
/* <div class="box-content">*/ | |
/* {{ tree.navigate_child(collection, admin, true) }}*/ | |
/* </div>*/ | |
/* </div>*/ | |
/* </div>*/ | |
/* {% endblock %}*/ | |
/* */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment