title: "Could not analyse class: maybe not loaded or no autoloader?"
body: <p>I created (my first) extension with one viewhelper.</p>
  
  <blockquote>
    <p>Oops, an error occurred!</p>
    
    <p>Could not analyse class:My\Mlv\ViewHelpers\Format\ReplacenewlinesViewHelper maybe not loaded or no autoloader?</p>
  </blockquote>
  
  <p>In use (with news):</p>
  
  <pre><code>{namespace m=My\Mlv\ViewHelpers}
  {newsItem.bodytext -&gt; m:format.replacenewlines()}
  </code></pre>
  
  <p>Directory tree of extension:</p>
  
  <pre><code>typo3conf/ext/mlv
    ext_emconf.php (copied from another ext)
    /Classes
      /ViewHelpers
        /Format
          ReplaceNewLinesViewHelper.php
  </code></pre>
  
  <p>ReplaceNewLinesViewHelper.php:</p>
  
  <pre><code>&lt;?php
  namespace My\Mlv\ViewHelpers\Format;
  
  /**
   * Replaces newlines in plain text with &lt;br&gt; tags.
   *
   * @author johndoe33
   * @package Mlv
   * @subpackage ViewHelpers\Format
   */
  class ReplaceNewLinesViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper {
  
      /**
       * Replaces newlines in plain text with &lt;br&gt; tags.
       *
       * @param string $content
       * @return string
       */
      public function render($content = NULL) {
          if (NULL === $content) {
              $content = $this-&gt;renderChildren();
          }
          $content = str_replace( "\n", '&lt;br&gt;', $content );
          return $content;
      }
  }
  </code></pre>