Skip to content

Commit 0ab4344

Browse files
cyildirimunicoder88
authored andcommitted
Link url fix and examples have been added on 4.1
1 parent b423ab5 commit 0ab4344

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

4. Working with Databases in Magento/1. Demonstrate ability to use data-related classes.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -106,16 +106,18 @@ public function getDataModel()
106106

107107
Based on interface, calls all SETTERS with given data to fill data object
108108

109-
[Api\DataObjectHelper::populateWithArray](https://github.com/magento/magento2/blob/2.2-develop/lib/internal/Magento/Framework/Api/DataObjectHelper.php#L80)
109+
[Api\DataObjectHelper::populateWithArray](https://github.com/magento/magento2/blob/2.3/lib/internal/Magento/Framework/Api/DataObjectHelper.php#L80)
110110
- calls data object SETTERS `set*`, `setIs*` with given raw data
111111
- handles `custom_attributes` - data object.setCustomAttribute
112112

113113

114+
Example: [Magento\Customer\Controller\Account\Edit::execute](https://github.com/magento/magento2/blob/2.3/app/code/Magento/Customer/Controller/Account/Edit.php#L78)
115+
114116
## buildOutputDataArray
115117

116118
Based on given interface, calls all GETTERS to make resulting data array.
117119

118-
[Reflection\DataObjectProcessor::buildOutputDataArray](https://github.com/magento/magento2/blob/2.2-develop/lib/internal/Magento/Framework/Reflection/DataObjectProcessor.php#L72):
120+
[Reflection\DataObjectProcessor::buildOutputDataArray](https://github.com/magento/magento2/blob/2.3/lib/internal/Magento/Framework/Reflection/DataObjectProcessor.php#L81):
119121
- \Magento\Framework\Reflection\MethodsMap::getMethodsMap - method name and getter return types
120122
- filter only getters: is..., has..., get...
121123
- get data using interface getter, e.g. $object->getSku() - based on Interface definition
@@ -125,3 +127,5 @@ Based on given interface, calls all GETTERS to make resulting data array.
125127
- process return object: build return value objects with their return type annotation
126128
- process return array: cast each element to type, e.g. int[] => (int) each value
127129
- cast element to type
130+
131+
Example: [Magento\Customer\Model\Address::updateData](https://github.com/magento/magento2/blob/2.3/app/code/Magento/Customer/Model/Address.php#L145)

0 commit comments

Comments
 (0)