Skip to content

Commit

Permalink
Implementation of the original functionality of the bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
m-adamski committed Oct 25, 2018
1 parent d4b22b2 commit d519250
Show file tree
Hide file tree
Showing 14 changed files with 3,361 additions and 2 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/.idea/
/vendor/
38 changes: 36 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,36 @@
# symfony-notification-bundle
Bundle for Symfony 4 which helps display information for the user
# Notification Bundle for Symfony 4

The Symfony 4 Bundle, which aims to simplify the communication with the end user.
By using simple functions, we can create information that will later be displayed to the user.

## Installation

This bundle can be installed by Composer:

```
$ composer require m-adamski/symfony-notification-bundle
```

## How to use it?

The helper provides a set of functions with which you can add a notification to the set, create a notification redirection, clear the list of all notifications.

| Method | Description |
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| addNotification | The function adds a notification of a specific type and message content |
| redirectNotification | The function returns a redirection to a specific URL address and adds a notification about certain parameters |
| routeRedirectNotification | Like the redirectNotification function, a redirection to a specific route is returned. Notification is created and added to set |
| clear | The function clears the set of all notifications |
| getNotifications | The function returns a list of all notifications |

In order for the notifications to be displayed, a reference to the function should be placed in the template.

```(html)
<section class="breadcrumbs-container">
{{ notification() }}
</section>
```

## License

MIT
40 changes: 40 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"name": "m-adamski/symfony-notification-bundle",
"description": "Bundle for Symfony 4 which helps display information for the user",
"type": "symfony-bundle",
"license": "MIT",
"authors": [
{
"name": "Maciej Adamski",
"email": "m.adamski@ideacode.pl"
}
],
"require": {
"php": "^7.1",
"symfony/framework-bundle": "^4.1",
"symfony/twig-bundle": "^4.1"
},
"require-dev": {
"kint-php/kint": "^3.0",
"phpunit/phpunit": "^7.4",
"symfony/phpunit-bridge": "^4.1"
},
"config": {
"sort-packages": true
},
"autoload": {
"psr-4": {
"Adamski\\Symfony\\NotificationBundle\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Adamski\\Symfony\\NotificationBundleTests\\": "tests/"
}
},
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
}
}
Loading

0 comments on commit d519250

Please sign in to comment.