title: Working out how Yii2 finds theme resources when using fallbacks
body: <p>I am using <code>Yii2</code> and have been reading about <a href="http://www.yiiframework.com/doc-2.0/guide-output-theming.html" rel="noreferrer">theming</a> and <a href="http://www.yiiframework.com/doc-2.0/guide-output-theming.html#theme-inheritance" rel="noreferrer">theme inheritance</a>; however have some questions:</p>
  
  <p>Consider the following example:</p>
  
  <pre><code>'view' =&gt; [
      'theme' =&gt; [
          'pathMap' =&gt; [
              '@app/views' =&gt; [
                  '@app/themes/current',
                  '@app/themes/default',
              ],
          ],
          'baseUrl' =&gt; '@web/themes/current',
          'basePath' =&gt; '@webroot/themes/current',
      ],
  ],
  </code></pre>
  
  <p>Now, imagine we request the theme file <code>foo</code>; as I understand it this will first be looked for in the following order:</p>
  
  <ul>
  <li><code>@app/themes/current/foo.php</code></li>
  <li><code>@app/themes/default/foo.php</code></li>
  <li><code>@app/views/foo.php</code></li>
  </ul>
  
  <p>Now imagine <code>foo.php</code> isn't found in the <code>@app/themes/current/</code> theme, so it would use the file found in <code>@app/themes/default/</code>.</p>
  
  <p>Now, considering the <code>baseUrl</code> and <code>basePath</code> settings I am a little confused how these are used in these situations.</p>
  
  <p>Now, imagine <code>foo.php</code> references an image file inside the file, wouldn't this still attempt to find <code>@web/themes/current/images/myImage.jpg</code> rather than <code>@web/themes/default/images/myImage.jpg</code>?</p>