コード例 #1
0
ファイル: Module.php プロジェクト: esase/dream-cms
 /**
  * Init view helpers
  *
  * @return array
  */
 public function getViewHelperConfig()
 {
     return ['invokables' => ['layoutHeadLink' => 'Layout\\View\\Helper\\LayoutHeadLink', 'layoutHeadScript' => 'Layout\\View\\Helper\\LayoutHeadScript'], 'factories' => ['layoutAsset' => function () {
         $cache = $this->serviceLocator->get('Application\\Cache\\Dynamic');
         return new \Layout\View\Helper\LayoutAsset($cache, LayoutService::getLayoutPath(), LayoutService::getCurrentLayouts(), LayoutService::getLayoutDir());
     }, 'layoutList' => function () {
         $layouts = $this->serviceLocator->get('Application\\Model\\ModelManager')->getInstance('Layout\\Model\\LayoutBase');
         return new \Layout\View\Helper\LayoutList($layouts->getAllInstalledLayouts(), LayoutService::getCurrentLayouts());
     }]];
 }