Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shouldn't FlashMessage helper method "error()" be named "danger()"? #313

Closed
ManoelLobo opened this issue Oct 22, 2014 · 0 comments · Fixed by #315
Closed

Shouldn't FlashMessage helper method "error()" be named "danger()"? #313

ManoelLobo opened this issue Oct 22, 2014 · 0 comments · Fixed by #315
Labels
Milestone

Comments

@ManoelLobo
Copy link

As the "-error" suffix was changed in BS 3.0 in favour of "-danger", shouldn't the helper method "FlashMessage::error()" be renamed (or aliased) as "FlashMessage::danger()"? Given that in Twig the convention used for , e.g., labels is "label_danger()", it seems a bit counterintuitive.

An adition like

\\ Braincrafted\Bundle\BootstrapBundle\Session\FlashMessage.php

...
    /**
     * Sets a danger message.
     * Conforms with Bootstrap 3 suffix.
     *
     * @param string $message The message
     *
     * @return void
     */
    public function danger($message)
    {
        $this->error($message);
    }
...

should do the trick as an alias, but maybe something deeper would be required for a long term change.

@ManoelLobo ManoelLobo changed the title FlashMessage helper method "error()" shouldn't be named "danger()"? Shouldn't FlashMessage helper method "error()" be named "danger()"? Oct 22, 2014
@florianeckerstorfer florianeckerstorfer added this to the 2.1.1 milestone Oct 24, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants