소스 검색

[Templating] renamed content slot to _content to avoid name collisions

Fabien Potencier 15 년 전
부모
커밋
7fce03c5bd
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      src/Symfony/Components/Templating/Engine.php

+ 3 - 3
src/Symfony/Components/Templating/Engine.php

@@ -121,12 +121,12 @@ class Engine
     if ($this->parents[$name])
     {
       $slots = $this->get('slots');
-      $this->stack[] = $slots->get('content');
-      $slots->set('content', $content);
+      $this->stack[] = $slots->get('_content');
+      $slots->set('_content', $content);
 
       $content = $this->render($this->parents[$name], $parameters);
 
-      $slots->set('content', array_pop($this->stack));
+      $slots->set('_content', array_pop($this->stack));
     }
 
     return $content;