diff --git a/src/Resources/views/tailwind_2/_header.html.twig b/src/Resources/views/tailwind_2/_header.html.twig index 6132e81..d45200a 100644 --- a/src/Resources/views/tailwind_2/_header.html.twig +++ b/src/Resources/views/tailwind_2/_header.html.twig @@ -3,6 +3,9 @@
+ {% if table.option('meta') and table.option('meta') != table.option('title') %} + {{ table.option('meta') }} + {% endif %} {% if table.option('title') %}

{{ table.option('title')|trans }} diff --git a/src/Table/Table.php b/src/Table/Table.php index 019e02f..152de22 100644 --- a/src/Table/Table.php +++ b/src/Table/Table.php @@ -20,6 +20,8 @@ class Table { public const OPT_TITLE = 'title'; + public const OPT_META = 'meta'; + public const OPT_PRIMARY_LINK = 'primary_link'; public const OPT_ATTRIBUTES = 'attributes'; @@ -85,6 +87,7 @@ public function configureOptions(OptionsResolver $resolver): void { $resolver->setDefaults([ self::OPT_TITLE => null, + self::OPT_META => null, self::OPT_PRIMARY_LINK => null, self::OPT_ATTRIBUTES => [], self::OPT_SEARCHABLE => false, @@ -114,6 +117,7 @@ public function configureOptions(OptionsResolver $resolver): void ]); $resolver->setAllowedTypes(self::OPT_TITLE, ['null', 'string']); + $resolver->setAllowedTypes(self::OPT_META, ['null', 'string']); $resolver->setAllowedTypes(self::OPT_PRIMARY_LINK, ['null', 'callable']); $resolver->setAllowedTypes(self::OPT_ATTRIBUTES, ['array']); $resolver->setAllowedTypes(self::OPT_SEARCHABLE, ['boolean']);