Skip to content

Commit

Permalink
Merge pull request #1809 from spryker/contributor-patch-2
Browse files Browse the repository at this point in the history
File Manager feature overview
  • Loading branch information
Vadym Sachenko authored May 12, 2023
2 parents 03102c8 + 4b34abb commit d313db0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "Create GUI modules"
title: Create GUI modules
description: This articles provides details how to create a new GUI module
template: howto-guide-template
redirect_from:
Expand All @@ -17,7 +17,7 @@ To install the Marketplace Merchant Portal Core feature providing the `ZedUi`, `

## 1) Create a new module

Create a new folder `Pyz\Zed\ExampleMerchantPortalGui` with a controller and corresponding Twig template:
1. Create a new folder `Pyz\Zed\ExampleMerchantPortalGui` with a controller and corresponding Twig template:

**src/Pyz/Zed/ExampleMerchantPortalGui/Communication/Controller/ExampleController.php**

Expand All @@ -40,7 +40,7 @@ class ExampleController extends AbstractController
}
```

**src/Pyz/Zed/ExampleMerchantPortalGui/Presentation/Test/index.twig**
**src/Pyz/Zed/ExampleMerchantPortalGui/Presentation/Example/index.twig**

{% raw %}

Expand All @@ -60,9 +60,15 @@ class ExampleController extends AbstractController

{% endraw %}

2. Clear the router cache:

```bash
console router:cache:warm-up
```

## 2) Set up ACL rules

Adjust `Spryker\Zed\AclMerchantPortal\AclMerchantPortalConfig::getMerchantAclRoleRules()`—add a newly introduced module to the allowed bundles list.
1. Adjust `Spryker\Zed\AclMerchantPortal\AclMerchantPortalConfig::getMerchantAclRoleRules()`—add a newly introduced module to the allowed bundles list.

```php
public function getMerchantAclRoleRules(): array
Expand Down Expand Up @@ -91,7 +97,7 @@ Adjust `Spryker\Zed\AclMerchantPortal\AclMerchantPortalConfig::getMerchantAclRol
}
```

Add a new merchant to the `merchant.csv` data import file and run:
2. Add a new merchant to the `merchant.csv` data import file and run the following command:

```bash
console data:import merchant
Expand All @@ -103,7 +109,7 @@ Check the `spy_acl_rule` database table and make sure that ACL rules for `exampl

{% endinfo_block %}

To deny access to Back Office users, adjust `Pyz/Zed/Acl/AclConfig::getInstallerRules()` to disallow the `example-merchant-portal-gui` bundle.
3. To deny access to Back Office users, adjust `Pyz/Zed/Acl/AclConfig::getInstallerRules()` to disallow the `example-merchant-portal-gui` bundle.

```php
public function getInstallerRules()
Expand Down Expand Up @@ -144,7 +150,7 @@ To deny access to Back Office users, adjust `Pyz/Zed/Acl/AclConfig::getInstaller

## 3) Navigation

Adjust `config/Zed/navigation.xml` with a link for a new page:
1. Adjust `config/Zed/navigation.xml` with a link for a new page:

**config/Zed/navigation.xml**

Expand All @@ -163,7 +169,7 @@ Adjust `config/Zed/navigation.xml` with a link for a new page:
</config>
```

Add a new navigation item:
2. Add a new navigation item:

```bash
console navigation:build-cache
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ This lets content managers create rich, compelling and attractive content for yo

|BACK OFFICE USER GUIDES|
|---|
| [Get a general idea of asset measurement](/docs/scos/user/features/{{page.version}}/file-manager-feature-overview/asset-management.html) |
| [Get a general idea of asset management](/docs/scos/user/features/{{page.version}}/file-manager-feature-overview/asset-management.html) |
| [Get a general idea of the file uploader](/docs/scos/user/features/{{page.version}}/file-manager-feature-overview/file-uploader.html) |
| [Manage file tree](/docs/scos/user/back-office-user-guides/{{page.version}}/content/file-manager/managing-file-tree.html) |
| [Manage file list](/docs/scos/user/back-office-user-guides/{{page.version}}/content/file-manager/managing-file-list.html) |
Expand Down

0 comments on commit d313db0

Please sign in to comment.