diff --git a/vendor/magento/module-contact/Block/ContactForm.php b/vendor/magento/module-contact/Block/ContactForm.php index d0450fb5b0e5..436e8131edbe 100644 --- a/vendor/magento/module-contact/Block/ContactForm.php +++ b/vendor/magento/module-contact/Block/ContactForm.php @@ -5,6 +5,7 @@ */ namespace Magento\Contact\Block; +use Magento\Framework\View\Element\Block\ArgumentInterface; use Magento\Framework\View\Element\Template; /** @@ -18,9 +19,11 @@ class ContactForm extends Template /** * @param Template\Context $context * @param array $data + * @param ArgumentInterface|null $viewModel */ - public function __construct(Template\Context $context, array $data = []) + public function __construct(Template\Context $context, array $data = [], ArgumentInterface $viewModel = null) { + $data['view_model'] = $viewModel; parent::__construct($context, $data); $this->_isScopePrivate = true; } diff --git a/vendor/magento/module-contact/ViewModel/ContactUsButton.php b/vendor/magento/module-contact/ViewModel/ContactUsButton.php new file mode 100644 index 000000000000..9d4db56d864d --- /dev/null +++ b/vendor/magento/module-contact/ViewModel/ContactUsButton.php @@ -0,0 +1,26 @@ + + + + Magento\Contact\ViewModel\UserDataProvider + + diff --git a/vendor/magento/module-contact/view/frontend/layout/contact_index_index.xml b/vendor/magento/module-contact/view/frontend/layout/contact_index_index.xml index c7009831d464..1f5e4fcbee96 100644 --- a/vendor/magento/module-contact/view/frontend/layout/contact_index_index.xml +++ b/vendor/magento/module-contact/view/frontend/layout/contact_index_index.xml @@ -12,10 +12,10 @@ - - Magento\Contact\ViewModel\UserDataProvider + Magento\Contact\ViewModel\ContactUsButton + diff --git a/vendor/magento/module-contact/view/frontend/templates/form.phtml b/vendor/magento/module-contact/view/frontend/templates/form.phtml index e9d0c065fd8b..8a48f60706e9 100644 --- a/vendor/magento/module-contact/view/frontend/templates/form.phtml +++ b/vendor/magento/module-contact/view/frontend/templates/form.phtml @@ -11,6 +11,7 @@ /** @var \Magento\Contact\ViewModel\UserDataProvider $viewModel */ $viewModel = $block->getViewModel(); +$contactUsButtonViewModel = $block->getData('contact_us_button_view_model'); ?>
getViewModel();
-
diff --git a/vendor/magento/module-customer/ViewModel/CreateAccountButton.php b/vendor/magento/module-customer/ViewModel/CreateAccountButton.php new file mode 100644 index 000000000000..8fa8718fe37e --- /dev/null +++ b/vendor/magento/module-customer/ViewModel/CreateAccountButton.php @@ -0,0 +1,26 @@ + Magento\Customer\Block\DataProviders\AddressAttributeData + Magento\Customer\ViewModel\CreateAccountButton diff --git a/vendor/magento/module-customer/view/frontend/layout/customer_account_edit.xml b/vendor/magento/module-customer/view/frontend/layout/customer_account_edit.xml index f4dfaa6586b1..b07ddcd41bc9 100644 --- a/vendor/magento/module-customer/view/frontend/layout/customer_account_edit.xml +++ b/vendor/magento/module-customer/view/frontend/layout/customer_account_edit.xml @@ -18,6 +18,9 @@ + + Magento\Customer\ViewModel\EditAccountButton + diff --git a/vendor/magento/module-customer/view/frontend/layout/customer_account_login.xml b/vendor/magento/module-customer/view/frontend/layout/customer_account_login.xml index 3518df736c4a..8fb51eeb6650 100644 --- a/vendor/magento/module-customer/view/frontend/layout/customer_account_login.xml +++ b/vendor/magento/module-customer/view/frontend/layout/customer_account_login.xml @@ -15,6 +15,9 @@ + + Magento\Customer\ViewModel\LoginButton + diff --git a/vendor/magento/module-customer/view/frontend/templates/form/edit.phtml b/vendor/magento/module-customer/view/frontend/templates/form/edit.phtml index b64ad58c17af..1fead138391c 100644 --- a/vendor/magento/module-customer/view/frontend/templates/form/edit.phtml +++ b/vendor/magento/module-customer/view/frontend/templates/form/edit.phtml @@ -8,6 +8,7 @@ use Magento\Customer\Block\Widget\Name; /** @var \Magento\Customer\Block\Form\Edit $block */ /** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */ +$editAccountButtonViewModel = $block->getData('edit_account_button_view_model'); ?>
-
diff --git a/vendor/magento/module-customer/view/frontend/templates/form/login.phtml b/vendor/magento/module-customer/view/frontend/templates/form/login.phtml index 73e9ec35d51c..784e13fe435e 100644 --- a/vendor/magento/module-customer/view/frontend/templates/form/login.phtml +++ b/vendor/magento/module-customer/view/frontend/templates/form/login.phtml @@ -7,6 +7,8 @@ // phpcs:disable Generic.Files.LineLength.TooLong /** @var \Magento\Customer\Block\Form\Login $block */ +/** @var \Magento\Customer\ViewModel\LoginButton $loginButtonViewModel */ +$loginButtonViewModel = $block->getData('login_button_view_model'); ?> + - +