You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: development/components/database/objectmodel.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -166,7 +166,7 @@ Field type is an important setting, it determines how ObjectModel will format yo
166
166
#### Validation rules reference
167
167
168
168
Several validation rules are available for your ObjectModel fields.
169
-
[Please refer to the Validate class of PrestaShop](https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/Validate.php) for a complete list.
169
+
[Please refer to the Validate class of PrestaShop](https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/Validate.php) for a complete list.
170
170
171
171
### Add timestamps to your entity (date_add and date_upd)
172
172
@@ -208,7 +208,7 @@ $cms->save();
208
208
209
209
In this example, we create an entity from scratch. Then, we set its `position` attribute, and we call the `save()` method. The `save()` method will trigger the `add()` method since its `id` attribute is not yet known (because the entity is not created in database).
210
210
211
-
If the insert is successful, the ObjectModel class will set the entity's id (retrieved from the database). [Complete reference here](https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/ObjectModel.php#L572-L658).
211
+
If the insert is successful, the ObjectModel class will set the entity's id (retrieved from the database). [Complete reference here](https://github.com/PrestaShop/PrestaShop/blob/9.1.0/classes/ObjectModel.php#L483-L576).
212
212
213
213
214
214
### Load and save an object
@@ -221,7 +221,7 @@ $cms->position = 3;
221
221
$cms->save();
222
222
```
223
223
224
-
In this example, we retrieve an entity from the database with its id. Then, we change its `position` attribute and call the same `save()` method. The `save()` method will trigger the `update()` method and not the `add()` method since its `id` attribute is known. [Complete reference here](https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/ObjectModel.php#L750-L868).
224
+
In this example, we retrieve an entity from the database with its id. Then, we change its `position` attribute and call the same `save()` method. The `save()` method will trigger the `update()` method and not the `add()` method since its `id` attribute is known. [Complete reference here](https://github.com/PrestaShop/PrestaShop/blob/9.1.0/classes/ObjectModel.php#L671-L750).
225
225
226
226
### Hard or soft delete an object
227
227
@@ -572,7 +572,7 @@ public function hookActionObjectProductDeleteAfter(Product $product)
572
572
573
573
Here is the reference of the methods described on this page. Many other methods that we don't described here are available.
574
574
575
-
See complete implementation here : [ObjectModel.php](https://github.com/PrestaShop/PrestaShop/blob/8.0.x/classes/ObjectModel.php)
575
+
See complete implementation here : [ObjectModel.php](https://github.com/PrestaShop/PrestaShop/blob/9.1.x/classes/ObjectModel.php)
'help' => $this->trans('Background color of this status label. Used both in backoffice and on order tracking page. HTML colors only.', 'Admin.Shopparameters.Help'),
Copy file name to clipboardExpand all lines: development/components/form/types-reference/delta-quantity-type.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ title: DeltaQuantityType
7
7
Quantity field that displays the initial quantity (not editable) and allows editing with delta quantity instead (ex: +5, -8). The input data of this form type is the initial (as a plain integer) however, its output on submit is the delta quantity.
Copy file name to clipboardExpand all lines: development/components/form/types-reference/entity-search-input-type.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ title: EntitySearchInputType
7
7
This form type is used for an OneToMany (or ManyToMany) association, it allows to search a list of entities (based on a remote URL) and associate it. It is based on the CollectionType form type which provides prototype features to display a custom template for each associated item.
0 commit comments