예제 #1
0
파일: Module.php 프로젝트: vjcspy/izcore
 /**
  * Get all assets from all modules
  *
  * @return array
  * @throws \Exception
  */
 public function getAssets()
 {
     if (!isset($isSupport)) {
         throw new \Exception('Please get From Theme');
     }
     if (is_null($this->assets)) {
         $this->assets = [];
         foreach ($this->module->getByStatus(1) as $module) {
             /** @var \Pingpong\Modules\Module $module */
             if ($asset = $this->getAssetsByModuleName($module->getName())) {
                 $this->assets = array_merge($this->assets, $asset);
             }
         }
     }
     return $this->assets;
 }
예제 #2
0
 /**
  * Get modules by status.
  *
  * @param $status
  * @return array 
  * @static 
  */
 public static function getByStatus($status)
 {
     return \Pingpong\Modules\Repository::getByStatus($status);
 }