Skip to content

Commit e8144e4

Browse files
committed
[Templating] added getPath() to TemplateReferenceInterface as it's used in the child class in FrameworkBundle
1 parent 72cdb48 commit e8144e4

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

src/Symfony/Component/Templating/TemplateReference.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,11 @@ public function all()
7575
return $this->parameters;
7676
}
7777

78+
/**
79+
* {@inheritDoc}
80+
*/
81+
public function getPath()
82+
{
83+
return $this->parameters['name'];
84+
}
7885
}

src/Symfony/Component/Templating/TemplateReferenceInterface.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,12 @@ function get($name);
5555
*/
5656
function getSignature();
5757

58+
/**
59+
* Returns the path to the template.
60+
*
61+
* By default, it just returns the template name.
62+
*
63+
* @return string A path to the template or a resource
64+
*/
65+
function getPath();
5866
}

0 commit comments

Comments
 (0)