From 8d1067e5f3b5ff4f9f2832f1319d8c78cee727d0 Mon Sep 17 00:00:00 2001 From: Green Date: Tue, 27 Oct 2020 13:51:48 +0100 Subject: [PATCH 1/4] update of the README file --- .gitignore | 2 + README.md | 135 +++++++++++++++++++++++++++++++++------------- logo-aropixel.png | Bin 0 -> 2234 bytes 3 files changed, 101 insertions(+), 36 deletions(-) create mode 100644 .gitignore create mode 100644 logo-aropixel.png diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..f32e31af --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.idea/ +.DS_Store diff --git a/README.md b/README.md index 5298a74a..5d7515ad 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,15 @@ -

- - Aropixel logo - -

+![Aropixel Logo](logo-aropixel.png) +#Aropixel Admin Bundle -

Aropixel Admin Bundle

- -

- Aropixel Admin Bundle is a bootstrap admin bundle for your Symfony 4 projects. It provides a minimalist admin system with: login, logout, admin users crud, admin menu management.
- You can plug compatible bundles to manage: -

-

+Aropixel Admin Bundle is a Bootstrap admin bundle for your Symfony 4/5 projects. It provides a minimalist admin system with: login, logout, admin users crud, admin menu management. +

+You can plug additional compatible bundles to manage your admin system: +- Blog content with [Aropixel Blog Bundle](https://github.com/aropixel/blog-bundle) +- The pages of your website with [Aropixel Page Bundle](https://github.com/aropixel/page-bundle) +- The menus of your website with [Aropixel Menu Bundle](https://github.com/aropixel/menu-bundle) +- Store and send incoming contacts with [Aropixel Contact Bundle](https://github.com/aropixel/contact-bundle) ![GitHub last commit](https://img.shields.io/github/last-commit/aropixel/admin-bundle.svg) [![GitHub issues](https://img.shields.io/github/issues/aropixel/admin-bundle.svg)](https://github.com/stisla/stisla/issues) @@ -25,32 +17,35 @@ ![Aropixel Admin Preview](./screenshot.png) - ## Table of contents - [Quick start](#quick-start) - [License](#license) - ## Quick start -- Create your symfony 4 project -- Require Aropixel Admin Bundle : `composer require aropixel/admin-bundle` +- Create your Symfony project. A few more steps and you'll be good to go ! + +- Require Aropixel Admin Bundle: `composer require aropixel/admin-bundle` + - If you get a "knplabs/knp-paginator-bundle" error, downgrade twig to version 2: `composer require twig/twig ^2.0` and re-install the AdminBundle + - Apply migrations -- Create a "aropixel.yaml" file in config folder and configure according to you need: -```` + +- Create a **aropixel.yaml** file in your config/packages folder and configure it according to your needs: +```yaml aropixel_admin: client: - name: "aropixel client" + name: "Your Client Name" copyright: name: "Aropixel" link: "http://www.aropixel.com" theme: menu_position: left -```` -- Configure the security.yaml: -```` +``` + +- Configure the **security.yaml** (you can copy and paste this one): +```yaml security: providers: @@ -103,18 +98,86 @@ security: - { path: ^/admin/login$, role: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/admin/, role: ROLE_ADMIN } -```` -- Include the routes: -```` +``` + +- Create another **aropixel.yaml** file in config/packages/routes folder and include the routes: +```yaml aropixel_admin: resource: '@AropixelAdminBundle/Resources/config/routing/aropixel.yml' prefix: /admin - -```` -- Create your first admin access : php bin/console aropixel:admin:setup - -- Add the ConfigureMenuListener class in App Folder and register it as service - +``` + +- In order to manage the menu of your admin system, you now need to create a new event listener. +This file will also be needed if you use other bundles from Aropixel. +It must be called **ConfigureMenuListener** and look like that: +```php +requestStack->getCurrentRequest(); + $this->factory = $event->getFactory(); + $this->em = $event->getEntityManager(); + $this->routeName = $request->get('_route'); + $this->routeParameters = $request->get('_route_params'); + + $this->menu = $event->getAppMenu('main'); + if (!$this->menu) { + $this->menu = $this->createRoot(); + } + + // To add an item to the navigation bar of your admin + // system, you'll need to indicate a name, a route + // in your admin system and a Fontawesome class as follow : + + $this->addItem("Dashboard", "_admin", "fas fa-home"); + + // You can also add some categories to put the items + // as it is done here for managing the users : + + $this->addCategory("Administration"); + $this->addItem("Users", "user_index", "fas fa-users"); + + // Another option is to create some group items to put them + // as one item with a dropdown : + + // $groupItem = $this->createGroupItem("Pages", "fas fa-file"); + // $this->addSubItem($groupItem, 'Homepage', ['route' => 'homepage', 'routeParameters' => ['type' => 'homepage']]); + // $this->addSubItem($groupItem, 'Contacts', ['route' => 'contacts', 'routeParameters' => ['type' => 'contacts']]); + // $this->addGroupItem($groupItem); + + // Do not remove this line + $event->addAppMenu($this->menu, false, 'main'); + } +} +``` +- Once your event listener created, add it to your 'services.yaml' (careful with the indentation): +```yaml +App\EventListener\ConfigureMenuListener: + tags: + - { name: kernel.event_listener, event: aropixel.admin_menu_configure, method: onMenuConfigure } +``` + +
+ +- You're all set 🎉 ! You can create your first admin access using +`php bin/console aropixel:admin:setup` and go to the route /admin to start +working on your project and manage your users. + +
+ +Cool, but not enough ? Check the others +[Aropixel bundles](https://github.com/aropixel/) to optimise your admin system ! ## License Aropixel Admin Bundle is under the [MIT License](LICENSE) diff --git a/logo-aropixel.png b/logo-aropixel.png new file mode 100644 index 0000000000000000000000000000000000000000..461e3d18f9da7c19bf175bd0bb53653a38feb16c GIT binary patch literal 2234 zcma)-c{Cf?9>>$=iKU{oHPq6DYO6(4OC^@E4=pKE71Wx>9<_v4BcXJtrIb-hEKwb` z6CG(uC9gG>KKs5k6qO($B?wYHebY1V&AfN!ynD{Q-_QM>?>*;x?mypzYc>|5!m`2u z06^68dsDkT-TJx(1@_K|Y$yFak-?ZDFhAV(!rbu)K>>_z-S$Ksw?un*qwG)~w<3by zqx1j(!JC$*M%V9-vFWyf2~%v0k5~oFL_4b54f7u|I)csnJ5IgI(P=YC^Qhh}4E-J+ zg&jD5xhrGIJq08PJw6vrJP`8@V*ibQG5f=lfB6KVK_6{2_mxT~DHiN*%+Ma?^V`*@ z9!YCHdkLJNZhK$W-Ly3kgvPTw2{a)J@f2GS`Yz=Ug8#I>`9Ma+eN}@!N!?b})Guub z_A+g4`{q)cJI;;)y#xLJIjdF!w_+@t_&co$bkuOQEY#-~et;`!4wmQz#}T$x6>VBnU$>_;%e?-sUT8_tY11h~Of z^LL*H(;RS18MyU8H)!gbO{CgrOSbC_WJR`gd?x8IVdvf8SvJ`62c4#RjjSRYU&(R64XPHb4;Ckd_vD`>#7wd$Ldp^Ck^a7);YsJeD-yt<4$1|3)kmyo;_8~ZT~s8Q+DZq$li)-{2BQk%+3Tc5y0 zqXs`-e?NiiX$N(z3CX;=V9~8+zE1Y!;AH!3))7E-eqn=8|NNR|fT@BcYSZlb$=64i zOR+mtBTI5QX8I!1l-8GV<@r+e*<}@lA`UcWkrimZ-pCgIoP=%93&L|4DfQp4Iqf!x4plPb zy#4Tn4|riCuWqa((!eTP?R%)8Uf(KO44?>ZMafVGVEg+>ACi{G4Tn*LTFUh(nr5tQZTv;uQCEt}< zq0*mvh>tq(lxeJn2ZnyEAJdr~&Upldn{lhEpn7>P^EeDeM8OM*e|skucVd_p98I`-Q!mMqu;lApEIwnyexVoVw6Cz|MlFn@}Njh zWj=%bs{JtSGfJ}UMni#Fc$;;JLBdp(5~69E>2h9>{$NGIR~tC`hM^bc6q$(_*lgA2V62NvQ&f;Cg<7Lno& zuvV<2t+-CT+nDCe9AC1m8fi#Q-+q;Dr@!7ACvITU(|vA#?gGA@yUW4$p_&Cmh@vJ zc$!%Yml#7UjHYHy)6dV%T*C)0*D~(Qs!oPRS?rFzGYdEvcn`F;b$ds$k7ImKV&_fN zhl{ScM^r}*Rn*k-9M~4hk%e8fM(yN-#P{!ylKKs^q&yNDv&@Wx1PZt0xTtnA9fN3c zfaXNB;6}(7auVx2?D_U}QF%N%#uO<2o{sWIwemcO{iyhP^J5SZb8aSa-!&T4F yjec{^72#ZyDYg8Ow4YD^DcxUOqZc=5fCGRu_N}=?R+ZqdPD?Wz(<)>4n12GnI3&LS literal 0 HcmV?d00001 From 9915ffde1d448837caba1951b062575a93183d78 Mon Sep 17 00:00:00 2001 From: Green Date: Tue, 27 Oct 2020 14:11:12 +0100 Subject: [PATCH 2/4] update of the README file --- README.md | 2 +- .../public/logo-aropixel.png | Bin 2 files changed, 1 insertion(+), 1 deletion(-) rename logo-aropixel.png => Resources/public/logo-aropixel.png (100%) diff --git a/README.md b/README.md index 5d7515ad..b36437c6 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![Aropixel Logo](logo-aropixel.png) +![Aropixel Logo](Resources/public/logo-aropixel.png) #Aropixel Admin Bundle diff --git a/logo-aropixel.png b/Resources/public/logo-aropixel.png similarity index 100% rename from logo-aropixel.png rename to Resources/public/logo-aropixel.png From cb5d0de106c2448359ffad92690651b566797686 Mon Sep 17 00:00:00 2001 From: Marien Regnault <61194210+green-onions@users.noreply.github.com> Date: Tue, 27 Oct 2020 14:29:47 +0100 Subject: [PATCH 3/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b36437c6..3d3fffa0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ![Aropixel Logo](Resources/public/logo-aropixel.png) -#Aropixel Admin Bundle +# Aropixel Admin Bundle Aropixel Admin Bundle is a Bootstrap admin bundle for your Symfony 4/5 projects. It provides a minimalist admin system with: login, logout, admin users crud, admin menu management.

From f9df211519c230b4f693f1d362510ea8f608a7d5 Mon Sep 17 00:00:00 2001 From: Marien Regnault <61194210+green-onions@users.noreply.github.com> Date: Tue, 27 Oct 2020 14:36:30 +0100 Subject: [PATCH 4/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3d3fffa0..06c05718 100644 --- a/README.md +++ b/README.md @@ -161,7 +161,7 @@ class ConfigureMenuListener extends AbstractMenuListener } } ``` -- Once your event listener created, add it to your 'services.yaml' (careful with the indentation): +- Once your event listener created, add it to your **services.yaml** (careful with the indentation): ```yaml App\EventListener\ConfigureMenuListener: tags: