Permalink
Browse files

Rename core Twig's extension

Signed-off-by: Leonardo Strozzi <laps15@inf.ufpr.br>
  • Loading branch information...
laps15 committed Jul 31, 2018
1 parent 8333a99 commit 04890c3ad8ab24a01a171c9cde44197f9a0c8362
Showing with 8 additions and 8 deletions.
  1. +6 −6 libraries/classes/Twig/CoreExtension.php
  2. +2 −2 templates/database/structure/show_create_row.twig
@@ -10,7 +10,7 @@
namespace PhpMyAdmin\Twig;
use Twig\Extension\AbstractExtension;
use Twig\TwigFunction;
use Twig\TwigFilter;
/**
* Class CoreExtension
@@ -20,15 +20,15 @@
class CoreExtension extends AbstractExtension
{
/**
* Returns a list of functions to add to the existing list.
* Returns a list of filters to add to the existing list.
*
* @return TwigFunction[]
* @return TwigFilter[]
*/
public function getFunctions()
public function getFilters()
{
return [
new TwigFunction(
'Core_mimeDefaultFunction',
new TwigFilter(
'mime_default_function',
'PhpMyAdmin\Core::mimeDefaultFunction',
['is_safe' => ['html']]
),
@@ -10,8 +10,8 @@
<tbody>
{% for object in db_objects %}
<tr>
<td><strong>{{ Core_mimeDefaultFunction(object) }}</strong></td>
<td>{{ Core_mimeDefaultFunction(dbi.getTable(db, object).showCreate()) }}</td>
<td><strong>{{ object|mime_default_function }}</strong></td>
<td>{{ dbi.getTable(db, object).showCreate()|mime_default_function }}</td>
</tr>
{% endfor %}
</tbody>

0 comments on commit 04890c3

Please sign in to comment.