2017 © Pedro Peláez
 

library mcm-common-website

Some common website configuration options for use with the Magium Configuration Manager

image

magium/mcm-common-website

Some common website configuration options for use with the Magium Configuration Manager

  • Monday, May 8, 2017
  • by kschroeder
  • Repository
  • 1 Watchers
  • 0 Stars
  • 25 Installations
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Magium Configuration Manager Common Website Configuration Options

This is used in conjunction with the Magium Configuration Manager. It provides some basic configuration options that most websites will use to provides some level of customization. This could include things like website titles, copyright dates, and such. On its own, these configuration options do not make much sense to have a component like this, but when used within the context of the Magium Configuration Manager it means that all of these configuration options can be managed via a UI or CLI on the production system without having to do a deployment to change configuration options., (*1)

Installation

composer install magium/mcm-common-website, (*2)

This will also install magium/configuration-manager if it has not been installed in your project yet., (*3)

Usage

First you need to configure the Magium Configuration Manager. You will find this information on its GitHub link above or on this YouTube video., (*4)

You can use the bin/magium-configuration CLI to manage the settings OR you can use the UI. The UI, however, is intended to be run from within your application because it uses the same configuration mechanisms that your application would use if it were using the MCM. However, if you want to just test out the system there is a standalone script that you can use for testing., (*5)

Your application may have different ways of wiring dependency injection and such, but if you have the MCM all wired up you would do something like this:, (*6)

getManager()->getConfiguration();

?>
<html>
    <head>
        <title><?php echo htmlspecialchars(
            $config->getValue(Magium\Mcm\Common\Website\Constants::GENERAL_TITLE)
        ); ?></title>
    </head>
    <body>
    <h1><a
        href="<?php echo htmlspecialchars(
            $config->getValue(Magium\Mcm\Common\Website\Constants::URL_BASE)
        ); ?>">
        <?php echo htmlspecialchars(
            $config->getValue(Magium\Mcm\Common\Website\Constants::GENERAL_TITLE)
        ); ?></a>
        <div>Some content</div>
        <footer>
            <span>Copyright
                <span><?php
                    echo htmlspecialchars(
                        $config->getValue(Magium\Mcm\Common\Website\Constants::COPYRIGHT_DATE)
                    ); ?></span>
                <span><?php
                    echo htmlspecialchars(
                    $config->getValue(Magium\Mcm\Common\Website\Constants::COPYRIGHT_OWNER)
                ); ?></span>
        </footer>
    </body>
</html>

The Versions

08/05 2017

dev-master

9999999-dev

Some common website configuration options for use with the Magium Configuration Manager

  Sources   Download

Apache-2.0

The Requires

 

08/05 2017

1.0.0

1.0.0.0

Some common website configuration options for use with the Magium Configuration Manager

  Sources   Download

Apache-2.0

The Requires