Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

view_helper_config flashmessenger key to support multiple namespaces. #11

Open
@alextech

Description

@alextech

I would like to propose a feature (I can implement myself if useful) that allows to optionally specify additional keys in view helper configuration for templates per namespace. Currently, if even a single namespace needs to have different template, need to fully take out configuration and copy/paste all 5 namespaces in an html template. I think may help to match configuration with full capability of what renderer can do. If flashmessenger is one dimensional array, continue to apply that template to all namespaces. If some namespaces are listed, apply specified template and default template to unlisted.

'view_helper_config' => [
    'flashmessenger' => [
      'success' => [
            'message_open_format'      => '<div%s><ul><li>',
             'message_separator_string' => '</li><li>',
             'message_close_string'     => '</li></ul></div>',
        ]

       'warning' => [
            'message_open_format'      => '<div%s><button type="button" class="close"
               data-dismiss="alert" aria-hidden="true">&times;</button><ul><li>',
             'message_separator_string' => '</li><li>',
             'message_close_string'     => '</li></ul></div>',
        ]
    ],

    'default' => [
       ....
     ]
],

If this is useful, then I can do it. But since this is a view helper task, do not know procedure of writing against PR that is not going to be accepted for a while #10, which ports the view helper from zend view to mvc plugin.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions