Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage of $this in template file #156

Closed
rafaelstz opened this issue Nov 2, 2019 · 1 comment
Closed

Usage of $this in template file #156

rafaelstz opened this issue Nov 2, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@rafaelstz
Copy link
Member

Steps to reproduce

  1. Check the contact form phtml
  2. There is a warning message regarding: $this->helper

Expected result

  1. I think it shouldn't be a warning since there is no helper method in the block.

Actual result

  1. It's showing a warning message.
@rafaelstz rafaelstz added the bug Something isn't working label Nov 2, 2019
@lenaorobei
Copy link
Contributor

Hi @rafaelstz. This is the expected behavior. The idea behind this is that view models should be used instead. The use of helpers in general is discouraged.

magento-devops-reposync-svc pushed a commit that referenced this issue Feb 11, 2022
…coding-standard-373

[Imported] AC-2222: [UCT Autofixing] PHPCompatibility.ForbiddenFinalPrivateMethods
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants