function registerMacros (ModuleInfo $moduleInfo)
  {
    $path =
      "{$this->kernelSettings->baseDirectory}/$moduleInfo->path/{$this->viewEngineSettings->moduleViewsPath()}/$this->moduleMacrosPath";
    if (fileExists ($path)) {
      $all = FilesystemFlow::from ($path)
                           ->onlyDirectories ()
                           ->map (function (\SplFileInfo $info, &$k) {
                             $k = $info->getPathname ();
                             return "$this->moduleMacrosPath/" . $info->getFilename ();
                           })->all ();
//      dump ($all);
      $all                     = array_merge ([$path => $this->moduleMacrosPath], $all);
      $this->macrosDirectories = array_merge ($all, $this->macrosDirectories);
    }
    return $this;
  }
function registerMacros (ModuleInfo $moduleInfo)
  {
    $path =
      "{$this->kernelSettings->baseDirectory}/$moduleInfo->path/{$this->viewEngineSettings->moduleViewsPath()}/$this->moduleMacrosPath";
    if (fileExists ($path)) {
      $all = FilesystemFlow::from ($path)
                           ->onlyDirectories ()
                           ->map (function (\SplFileInfo $info, &$k) {
                             $k = $info->getPathname ();
                             return "$this->moduleMacrosPath/" . $info->getFilename ();
                           })->all ();
//      dump ($all);
      $all                     = array_merge ([$path => $this->moduleMacrosPath], $all);
      $this->macrosDirectories = array_merge ($all, $this->macrosDirectories);
    }
    return $this;
  }
function registerMacros ( ModuleInfo $ moduleInfo ) { $ path = "{$this->kernelSettings->baseDirectory}/$moduleInfo->path/{$this->viewEngineSettings->moduleViewsPath()}/$this->moduleMacrosPath" ; if ( fileExists ( $ path ) ) { $ all = FilesystemFlow :: from ( $ path ) -> onlyDirectories ( ) -> map ( function ( \ SplFileInfo $ info , & $ k ) { $ k = $ info -> getPathname ( ) ; return "$this->moduleMacrosPath/" . $ info -> getFilename ( ) ; } ) -> all ( ) ; //      dump ($all); $ all = array_merge ( [ $ path => $ this -> moduleMacrosPath ] , $ all ) ; $ this -> macrosDirectories = array_merge ( $ all , $ this -> macrosDirectories ) ; } return $ this ; }
Registers a module's macros directory, along with any immediate sub-directories.

@param ModuleInfo $moduleInfo
@return $this
Registers a module s macros directory along with any immediate sub - directories .