Skip to content

Commit

Permalink
Merge branch '8.x' into customizeCrud
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasnares authored Nov 7, 2023
2 parents 903a4a3 + 8b1fa2c commit c77c8b0
Show file tree
Hide file tree
Showing 438 changed files with 5,442 additions and 7,809 deletions.
54 changes: 54 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,57 @@ The deployment pipeline is documented on the [sources repository for DevDocs](ht
## License

Content from this documentation is licensed under the [Creative Commons Attribution-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-sa/4.0/).

## Maintaining Hook list referential

A complete referential of hook and informations on each hook is located in `modules/concepts/hooks/list-of-hooks/`.

This referential can be generated with a script, crawling all:

- PrestaShop (core) codebase
- all native modules
- all native themes

In the documentation, a hook is described in yaml format:

```yaml
---
Title: string #name of the hook
hidden: boolean[true] #must be true
hookTitle: string #title for the description
description: string #description sentence
origin: string #core, module or theme
files:
-
theme: string #theme name only if origin=theme
module: string #module name only if origin=module
url: string #url of the file on github
file: string #path of the file
locations:
- string #back office, front office or both
type: string #action or display
hookAliases:
- string #old hook name or alias
array_return: boolean #true or false if the hook has an `$array_return` parameter set to `true`
check_exceptions: boolean #true or false if the hook has a `$check_exceptions` parameter set to `false`
chain: boolean #true or false if the hook has a `$chain` parameter set to `true`
---
```

This YAML structure enables the shortcode `hookDescriptor` to generate an HTML page with condensed information for documentation, and allows the search script to search within this metadata.

Next, add the shortcode in the page's content:

```
{{% hookDescriptor %}}
```

Finally, if available, add a section with a code example and parameters details:

```
## Parameters details
[...]
## Call of the Hook in the origin file
[...]
```
2 changes: 1 addition & 1 deletion _index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ hookListUrl: "/8/modules/concepts/hooks/list-of-hooks" # this allows for dynami

# PrestaShop 8 Documentation

{{% children %}}
{{% children /%}}
2 changes: 1 addition & 1 deletion basics/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ icon: fa-play

Discover what PrestaShop is all about and the core concepts behind it.

{{% children %}}
{{% children /%}}
2 changes: 1 addition & 1 deletion basics/deployment/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ showOnHomepage: true

# Deployment

{{% children %}}
{{% children /%}}
2 changes: 1 addition & 1 deletion basics/installation/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ PrestaShop comes in two "flavors":
- **Release package**. A zip package, tuned for production environments.
- **Development version**. The raw source code as it is on the GitHub repository, including automated test suites, build scripts and source codes for assets that are otherwise compiled (like javascript and css files).

![Download files](../img/Prestashop_1.7.8.6_release.png)
![Download files](img/Prestashop_1.7.8.6_release.png)

{{% notice tip %}}
**Prefer cloning the repository using git for the development version.**
Expand Down
2 changes: 1 addition & 1 deletion basics/installation/advanced/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ chapter: true

# Advanced topics on PrestaShop Installation

{{% children %}}
{{% children /%}}
2 changes: 1 addition & 1 deletion basics/keeping-up-to-date/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,5 @@ A migration consists in:

## Read more

{{% children %}}
{{% children /%}}

2 changes: 1 addition & 1 deletion basics/keeping-up-to-date/upgrade-module/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Also known as the "Autoupgrade module" or the "1-click upgrade module", PrestaSh

Details on how to use the web interface are documented in [Keep up-to-date: Upgrade Assistant page]({{< ref "/8/basics/keeping-up-to-date/use-autoupgrade-module.md" >}}).

{{% children %}}
{{% children /%}}

## How to download it

Expand Down
2 changes: 1 addition & 1 deletion contribute/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ PrestaShop is a community project, made by hundreds of people collaborating arou

- [How to get involved in the project](https://www.prestashop-project.org/get-involved/)

{{% children %}}
{{% children /%}}
2 changes: 1 addition & 1 deletion contribute/contribute-pull-requests/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ If you wish to start contributing smoothly, have a look at [issues labelled "goo

We explain two ways to run PrestaShop from the sources: using docker or localhost

{{% children %}}
{{% children /%}}
2 changes: 1 addition & 1 deletion contribute/contribution-process/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ showOnHomepage: true

The PrestaShop project receives a great number of new issues and Pull Requests every week. Each new submission goes through a process where PrestaShop maintainers analyze, qualify and prioritize them.

{{% children %}}
{{% children /%}}
2 changes: 1 addition & 1 deletion development/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ icon: fa-book

This section describes technical aspects of the PrestaShop Core.

{{% children %}}
{{% children /%}}
2 changes: 1 addition & 1 deletion development/architecture/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ PrestaShop has been built as a monolith following traditional object-oriented PH

## Topics

{{% children description="true" %}}
{{% children description="true" /%}}

2 changes: 1 addition & 1 deletion development/architecture/domain/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ One of the main features at the heart of this design is _Command-Query Responsib

## Read more

{{% children %}}
{{% children /%}}
2 changes: 1 addition & 1 deletion development/architecture/domain/references/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ weight: 60

# List of available Commands and Queries

{{% children %}}
{{% children /%}}
2 changes: 1 addition & 1 deletion development/architecture/legacy/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ summary: "This section describes components from the Legacy architecture."

This section describes components from the Legacy architecture.

{{% children %}}
{{% children /%}}
2 changes: 1 addition & 1 deletion development/architecture/migration-guide/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ This is the list of items that usually need to be done in order to complete the

## Contents of this guide

{{% children %}}
{{% children /%}}
2 changes: 1 addition & 1 deletion development/architecture/migration-guide/forms/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,5 @@ Forms are created and declared [as services](https://symfony.com/doc/4.4/form/fo

## Learn more

{{% children %}}
{{% children /%}}

Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ So, there are basically three steps:
Every form in modern controllers must be handled this way, and the controller code should be kept minimalist and easy to read and understand.
{{% /notice %}}

{{% callout %}}
##### Summary with a schema

The following schemas sums up how Form Handlers, Form Builders, Controllers and Data Providers are wired together.
Expand Down
2 changes: 1 addition & 1 deletion development/architecture/migration-guide/testing/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ you have created.

You **must** add a [smoke test]({{< relref "/8/development/architecture/migration-guide/testing/unit#smoke-testing" >}}) (also called "survival") for every new page you migrate.

{{% children %}}
{{% children /%}}
2 changes: 1 addition & 1 deletion development/architecture/modern/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ summary: "This section describes components from the Modern architecture."

This section describes components from the Modern architecture.

{{% children %}}
{{% children /%}}
2 changes: 1 addition & 1 deletion development/components/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ showOnHomepage: true

# Components

{{% children %}}
{{% children /%}}
1 change: 1 addition & 0 deletions development/components/configuration/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,4 @@ $configuration->set(
{{% notice note %}}
Check the [config console command]({{< relref "/8/development/components/console/prestashop-config" >}}) for setting values from CLI

{{% /notice %}}
2 changes: 1 addition & 1 deletion development/components/console/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ menuTitle: Console

PrestaShop uses the [Symfony Console](https://symfony.com/doc/current/components/console.html) component and provides its own set of commands.

{{% children %}}
{{% children /%}}
10 changes: 5 additions & 5 deletions development/components/database/db.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The first call to this method initializes the link to the database, and return t
In some cases, you might encounter this alternative:

```php
$db = Db::getInstance(_PS_USE_SQL_SLAVE_);
$db = \Db::getInstance(_PS_USE_SQL_SLAVE_);
```

If PrestaShop's database user allows the use of MySQL slave servers in its architecture, then this last instance's connection can be done on the slave servers.
Expand Down Expand Up @@ -56,7 +56,7 @@ It should only be used for read only queries: SELECT, SHOW, etc.
Using getRow() method will retrieve the first row of your query:

```php
$request = "SELECT `id_table` FROM `' . _DB_PREFIX_ . 'some_table` ...";
$request = 'SELECT `id_table` FROM `' . _DB_PREFIX_ . 'some_table` ...';

/** @var array $result */
$result = $db->getRow($request);
Expand All @@ -70,7 +70,7 @@ This function automatically adds "LIMIT 1" to the query.
#### Retrieving only a single value

```php
$request = "SELECT `count('sales')` FROM `' . _DB_PREFIX_ . 'some_table` ...";
$request = 'SELECT `count('sales')` FROM `' . _DB_PREFIX_ . 'some_table` ...';

/** @var string|false $salesCount */
$salesCount = $db->getValue($request);
Expand Down Expand Up @@ -103,7 +103,7 @@ Returns the number of rows impacted by the latest `INSERT`, `UPDATE`, `REPLACE`
### Execute a raw SQL request (UPDATE, INSERT...)

```php
$request = "INSERT INTO `' . _DB_PREFIX_ . 'some_table` (`id_table`) VALUES (10)";
$request = 'INSERT INTO `' . _DB_PREFIX_ . 'some_table` (`id_table`) VALUES (10)';

/** @var bool $result */
$result = $db->execute($request);
Expand Down Expand Up @@ -141,7 +141,7 @@ The result is a boolean whose state indicates if the request was properly execut
: If false, PrestaShop's cache management is disabled during this query. Do not change this parameter unless you knew exactly what you are doing.

`$type`
: If you wish to change the insertion, this parameter can take the following constants: `Db::INSERT`, `Db::INSERT_IGNORE` or `Db::REPLACE`.
: If you wish to change the insertion, this parameter can take the following constants: `Db::INSERT`, `Db::INSERT_IGNORE`, `Db::REPLACE` or `Db::ON_DUPLICATE_KEY`.

`$add_prefix`
: If false, table prefix will not be automatically added to the table name.
Expand Down
2 changes: 1 addition & 1 deletion development/components/export/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ menuTitle: Export

# Export Components

{{% children %}}
{{% children /%}}
2 changes: 1 addition & 1 deletion development/components/faceted-search/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ Any change in the behavior of the `CategoryController` or a template renaming re
{{< figure src="img/facetedsearch.png" title="Faceted search screenshot" >}}


{{% children %}}
{{% children /%}}
2 changes: 1 addition & 1 deletion development/components/grid/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -414,4 +414,4 @@ You can update this schema using the [source XML file](/8/schemas/grid_workflow_

## Learn more

{{% children %}}
{{% children /%}}
2 changes: 1 addition & 1 deletion development/components/grid/tutorials/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ chapter: true

# Grid tutorials

{{% children %}}
{{% children /%}}
2 changes: 1 addition & 1 deletion development/configuration/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ showOnHomepage: true

# PrestaShop configuration reference

{{% children %}}
{{% children /%}}
2 changes: 1 addition & 1 deletion development/internationalization/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ In this section you'll learn more about how to work with PrestaShop's internatio

#### In this section

{{% children %}}
{{% children /%}}
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ PrestaShop uses Symfony's [Translator Component](https://symfony.com/doc/4.4/tra

This component is initialized for the configured language by loading five Catalogue Resources:

* **Customized translations database** - Located in the `ps_translations` table.
* **Customized translations database** - Located in the `ps_translation` table.
* **Active theme** – XLF files in `./themes/<themename>/translations`.
* **Core** – XLF files in `./translations`.
* **Active modules** – XLF files in `./modules/<modulename>/translations`.
Expand Down
2 changes: 1 addition & 1 deletion development/multistore/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ Moreover the Back Office interface is modified to allow Back Office users to man

## Topics

{{% children %}}
{{% children /%}}
9 changes: 6 additions & 3 deletions development/naming-conventions/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,7 @@ services:
### Named arguments
**Do NOT** use "named argument" syntax in service declaration:
**Do NOT** use "named argument" syntax in your front services declaration:
```yaml
services:
Expand All @@ -206,9 +205,13 @@ services:
wrong_foo_bar:
class: 'Foo\Bar'
arguments:
- $baz: 'baz'
$baz: 'baz'
```
If you do try to use named arguments in your front services definition you will end up with the following error:
> Fatal error: Uncaught Symfony\Component\DependencyInjection\Exception\RuntimeException: Invalid service "wrong_foo_bar": class "Foo\Bar" does not exist.
## Grid
PrestaShop comes with a lot of Grids (Products, Customers, Orders & etc) and keeping consistency between them is very important, thats why it follows these naming conventions:
Expand Down
2 changes: 1 addition & 1 deletion development/page-reference/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ chapter: true

# Page Reference

{{% children %}}
{{% children /%}}
2 changes: 1 addition & 1 deletion development/page-reference/back-office/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ chapter: true

# Back Office Pages

{{% children %}}
{{% children /%}}
2 changes: 1 addition & 1 deletion development/page-reference/back-office/order/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ chapter: true

# Order Detail Page

{{% children %}}
{{% children /%}}
2 changes: 1 addition & 1 deletion development/page-reference/back-office/product/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ chapter: true

# Product Page

{{% children %}}
{{% children /%}}
2 changes: 1 addition & 1 deletion faq/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ This section aim is to become the source of truth for the PrestaShop community t

If someone asks you similar questions and you know answers, please do not hesitate - create a pull request and help to fill this section up!

{{% children %}}
{{% children /%}}
2 changes: 1 addition & 1 deletion faq/tips-and-tricks/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ showOnHomepage: true

# Tips & tricks

{{% children %}}
{{% children /%}}
2 changes: 1 addition & 1 deletion modules/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ programs that make use of PrestaShop's functionalities and changes them
or add to them in order to make PrestaShop easier to use or more
tailored to the merchant's needs.

{{% children %}}
{{% children /%}}
2 changes: 1 addition & 1 deletion modules/concepts/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ showOnHomepage: true

# Extension concepts

{{% children %}}
{{% children /%}}
Loading

0 comments on commit c77c8b0

Please sign in to comment.