/** * 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; }
/** * Get modules by status. * * @param $status * @return array * @static */ public static function getByStatus($status) { return \Pingpong\Modules\Repository::getByStatus($status); }