I am new to Magento2 and I am confused how to proceed when I want to rewrite default part of the Luma theme page completely. For example the header - I want to rebuild it from scratch, adding whatever I want in it. Can someone share a brief list of what is the best way to approach this. I already did all of this -
http://magento.stackexchange.com/a/102359/36102
After that I created a new module in
app/code/MyVendor/MyTheme
registered it and everything. I put the dependency that MyTheme depends on Magento_Theme. After that I am a bit lost as how should I proceed re-writing the
vendor/magento/magento-theme/Block/Html/Header.php
What is the best approach for that. Can someone give detailed list of steps like:
1)Create Custom module MyVendor_MyTheme
2)extend or re-declare Magento_Theme..
3)Create app/code/MyVendor/MyTheme/Block/Html/Header.php
And so on and so on, so I can re-write
vendor/magento/magento-theme/Block/Html/Header->getWelcome();
functionality and link it to
app/design/frontend/{Vendor}/{theme}/MyVendor_MyTheme/templates/html
so it can use the functionality from MyTheme module block and the template for the header.phtml file I've set in
app/design/frontend/{Vendor}/{theme}/MyVendor_MyTheme/templates/html/header.phtml.
Thank you.