Skip to content
This repository has been archived by the owner on Feb 6, 2020. It is now read-only.
/ zf-portals Public archive

A module to pull configuration together for portals, such as a public portal, an admin portal, etc.

License

Notifications You must be signed in to change notification settings

riddlestone/zf-portals

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Riddlestone ZF-Portals

A module to pull configuration together for portals, such as a public portal, an admin portal, etc.

Repository archived 2020-02-06

This repository has moved to riddlestone/brokkr-portals.

Adding Configuration

To add information about a portal, add it to a module configuration file under portals.{portal_name}:

return [
    'portals' => [
        'main' => [
            'layout' => 'main.layout',
            'resources' => [
                __DIR__ . '/../css/styles.css',
                __DIR__ . '/../js/scripts.js',
            ],
        ],
    ],
];

Alternatively, you can merge new configuration in manually if needed:

/** @var \Riddlestone\ZF\Portals\PortalManager $portalManager */

$portalManager->mergeConfig(
    [
        'main' => [
            'resources' => [
                'another.css',
            ],
        ],
    ]
);

Getting the Portal Manager

/** @var \Zend\ServiceManager\ServiceManager $serviceManager */

$portalManager = $serviceManager->get(\Riddlestone\ZF\Portals\PortalManager::class);

Getting Configuration

/** @var \Riddlestone\ZF\Portals\PortalManager $portalManager */

# get a list of portals
$portals = $portalManager->getPortalNames();

# get the current portal name
$portal = $portalManager->getCurrentPortalName();

# get the config for a portal
$portalConfig = $portalManager->getPortalConfig('main');

# get the config for the current portal
$portalConfig = $portalManager->getCurrentPortalConfig();

About

A module to pull configuration together for portals, such as a public portal, an admin portal, etc.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages