| @@ 37-47 (lines=11) @@ | ||
| 34 | /** |
|
| 35 | * {@inheritdoc} |
|
| 36 | */ |
|
| 37 | public function getFunctions() |
|
| 38 | { |
|
| 39 | return array( |
|
| 40 | new \Twig_SimpleFunction('table_name', \Closure::bind(function($entity) { |
|
| 41 | return $this->getTableName($entity); |
|
| 42 | }, $this)), |
|
| 43 | new \Twig_SimpleFunction('column_name', \Closure::bind(function($field, $entity) { |
|
| 44 | return $this->getColumnName($field, $entity); |
|
| 45 | }, $this)) |
|
| 46 | ); |
|
| 47 | } |
|
| 48 | ||
| 49 | /** |
|
| 50 | * {@inheritdoc} |
|
| @@ 52-62 (lines=11) @@ | ||
| 49 | /** |
|
| 50 | * {@inheritdoc} |
|
| 51 | */ |
|
| 52 | public function getFilters() |
|
| 53 | { |
|
| 54 | return array( |
|
| 55 | new \Twig_SimpleFilter('table_name', \Closure::bind(function($entity) { |
|
| 56 | return $this->getTableName($entity); |
|
| 57 | }, $this)), |
|
| 58 | new \Twig_SimpleFilter('column_name', \Closure::bind(function($field, $entity) { |
|
| 59 | return $this->getColumnName($field, $entity); |
|
| 60 | }, $this)) |
|
| 61 | ); |
|
| 62 | } |
|
| 63 | ||
| 64 | /** |
|
| 65 | * Get table name for entity |
|