Skip to content

Commit

Permalink
Merge pull request #2554 from jdreesen/patch-1
Browse files Browse the repository at this point in the history
Improve resource bundle docs a bit
  • Loading branch information
dpfaffenbauer committed Feb 16, 2024
2 parents 3ad5dfe + 21747cc commit d4d4f15
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
14 changes: 7 additions & 7 deletions docs/03_Bundles/Resource_Bundle/01_Custom_Entities.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ First, create your Entity Class. In this case, we create a Translatable Entity.

### CustomEntityInterface

Create CustomEntityInterface.php in the AppBundle/Model directory.
Create `CustomEntityInterface.php` in the `AppBundle/Model` directory.

```php

<?php

interface CustomEntityInterface extends ResourceInterface, TranslatableInterface {
Expand Down Expand Up @@ -201,8 +200,9 @@ app_custom_entity:
alias: app.custom_entity
```

GET: /admin/app/custom_entity/list
GET: /admin/app/custom_entity/get
POST: /admin/app/custom_entity/add
POST: /admin/app/custom_entity/save
DELETE: /admin/app/custom_entity/delete
It will define the following routes:
- `GET`: `/admin/app/custom_entity/list`
- `GET`: `/admin/app/custom_entity/get`
- `POST`: `/admin/app/custom_entity/add`
- `POST`: `/admin/app/custom_entity/save`
- `DELETE`: `/admin/app/custom_entity/delete`
10 changes: 5 additions & 5 deletions docs/03_Bundles/Resource_Bundle/02_Pimcore_Entities.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

1. Create a new class in Pimcore.
2. Add a Parent Class to your Pimcore Entity.
3. Export Class Definition to AppBundle/Resources/install/pimcore/classes/PimcoreEntity.json.
3. Export Class Definition to `AppBundle/Resources/install/pimcore/classes/PimcoreEntity.json`.

## Step 2: Create Parent Class

### PimcoreEntityInterface

Create PimcoreEntityInterface.php in the AppBundle/Model directory.
Create `PimcoreEntityInterface.php` in the `AppBundle/Model` directory.

```php
<?php
Expand All @@ -24,7 +24,7 @@ interface PimcoreEntityInterface extends ResourceInterface {

### PimcoreEntity

Create PimcoreEntity.php in the AppBundle/Model directory.
Create `PimcoreEntity.php` in the `AppBundle/Model` directory.

```php
<?php
Expand All @@ -45,7 +45,7 @@ class PimcoreEntity extends AbstractPimcoreModel implements PimcoreEntityInterfa

### Configuration.php

Create Configuration.php in AppBundle/DependencyInjection.
Create `Configuration.php` in `AppBundle/DependencyInjection`.

```php
<?php
Expand Down Expand Up @@ -102,7 +102,7 @@ final class Configuration implements ConfigurationInterface

### AppBundleExtension.php

Create AppBundleExtension.php in the same directory.
Create `AppBundleExtension.php` in the same directory.

```php
<?php
Expand Down

0 comments on commit d4d4f15

Please sign in to comment.