File tree Expand file tree Collapse file tree 1 file changed +23
-12
lines changed
Expand file tree Collapse file tree 1 file changed +23
-12
lines changed Original file line number Diff line number Diff line change @@ -16,34 +16,45 @@ As soon as a class property is a ``Pimcore\ModelAsset\Image`` it will be visible
1616app/config/config.yml
1717```
1818basilicom_path_formatter:
19- pattern: "{logo } {identifier }"
19+ pattern: "{name } {price}{unit }"
2020```
2121
22- var/classes/DataObject/Client .php
22+ var/classes/DataObject/Product .php
2323```
24- class Client extends Concrete
24+ class Product extends Concrete
2525{
2626 protected $o_classId = "1";
27- protected $o_className = "Client";
28- protected $identifier;
29- protected $logo;
27+ protected $o_className = "Product";
28+ protected $name;
29+ protected $price;
30+ protected $unit;
3031
3132 /**
32- * Get identifier
33+ * Get name
3334 *
3435 * @return string
3536 */
36- public function getIdentifier ()
37+ public function getName ()
3738 {
3839 // ...
3940 }
4041
4142 /**
42- * Get logo
43+ * Get price
4344 *
44- * @return \Pimcore\Model\Asset\Image
45+ * @return float
4546 */
46- public function getLogo()
47+ public function getPrice()
48+ {
49+ // ...
50+ }
51+
52+ /**
53+ * Get unit
54+ *
55+ * @return string
56+ */
57+ public function getUnit()
4758 {
4859 // ...
4960 }
@@ -56,7 +67,7 @@ class Client extends Concrete
5667 basilicom_path_formatter:
5768 pattern:
5869 Pimcore\Model\DataObject\Client: "{logo} {identifier}"
59- Pimcore\Model\DataObject\Product: "{price}{unit}"
70+ Pimcore\Model\DataObject\Product: "{name} { price}{unit}"
6071 ```
6172- add button to relation-fields to prefill the formatter class
6273- implement helper methods for simple string modifications
You can’t perform that action at this time.
0 commit comments