title: yii2 registering JS files to a View
body: <p>I have A.php view file in <code>/views/A/</code> folder.
  And I have A.js js file in <code>/views/A/</code> folder
  Please help me register js file in view file.</p>
  
  <p>As I understand I must write 
  <code>$this-&gt;registerJsFile('path/to/file.js');</code> in view file.</p>
  
  <p>But (Question A) I get <code>method registerJsFile is not found in a class</code>  message from PHPStorm.</p>
  
  <p>Also (Question B) what should I write in path considering both files are in the same folder <code>/views/A/</code> ?</p>