Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- go to implementation [alt+click]
- go to usage [ctrl+click]
- go to file [ctrl+shift+o]
- go to anywhere [shift + shift] ( rebind to ctrl +r )
- expand selection [alt + up]
- unexpand selection [alt + down ]
- go to last edit point [ctrl+shift+backspace]
- duplicate line [ctrl+d]
- delete line [ctrl+backspace]
- find in Path [ctrl+shift+f]
- refactoring [ctrl+shift+a]
- settings:
- php mess detector [https://www.jetbrains.com/help/phpstorm/using-php-mess-detector.html#installing-configuring-mess-detector]
- typehints on
- docker image instead of executable
- https://devdocs.magento.com/guides/v2.4/test/unit/unit_test_execution_phpstorm.html
- setup:
- phpunit docker magento
- php mess detector docker
- magento docker phpstorm
- magento phpstorm extension
- look @ order attribute extension github
- ===========
- docker hijack cmd that installs magento and vendor composer
- container that installs php 7.3 && mysql
- interpreter and everything else = on docker
- volume mount in docker compose
- ===========
- abstract class provides a lot of hook-into methods at certain (events interceptors observers) that initially return just $this for chaining, the functions exist, but business logic inside method/function is just 'return $this' that you can just
- ============
- without compiling everytime change test -- anser: di static deploy
- you implement interface class
- extend class: override methods, exclude methods you dont want to override but still can call them from parent class inheritance.
- <?php
- class Foo
- {
- public function printItem($string)
- {
- echo 'Foo: ' . $string . PHP_EOL;
- }
- public function printPHP()
- {
- echo 'PHP is great.' . PHP_EOL;
- }
- }
- class Bar extends Foo
- {
- public function printItem($string)
- {
- echo 'Bar: ' . $string . PHP_EOL;
- }
- }
- $foo = new Foo();
- $bar = new Bar();
- $foo->printItem('baz'); // Output: 'Foo: baz'
- $foo->printPHP(); // Output: 'PHP is great'
- $bar->printItem('baz'); // Output: 'Bar: baz'
- $bar->printPHP(); // Output: 'PHP is great'
- ?>
- =========
- use "plugin" getFinalPrice mutate to 20% off if cart qty > 4
- use di.xml to inject intercept
- =====
- hotkey enter definition
- hotkey scroll by function scope up/down
- =====
- report module install upgrade schema create new instance and save of a report (createReportFactory or something )
- =
- https://magento.stackexchange.com/questions/158555/magento-2-update-the-price-value-in-shopping-cart-page
- =
- order attribute shipping instructions use this class (search for examples in github)
- page 163 of the pdf
- https://github.com/magento/magento2/blob/2.3/app/code/Magento/Sales/Setup/SalesSetup.php
Add Comment
Please, Sign In to add comment