2017 © Pedro Peláez
 

library theme-keeper

Keeper of themes.

image

ldrahnik/theme-keeper

Keeper of themes.

  • Sunday, September 17, 2017
  • by ldrahnik
  • Repository
  • 1 Watchers
  • 0 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Strongly recommend use Kappa/ThemesManager.

If you use Modules structure Kappa/ThemesManager is more effective if not that is still better. Forgot on this package it was just attempt. Is deprecated and will not be more developed., (*1)

ldrahnik/~~theme-keeper~~

Build Status Latest stable Downloads total, (*2)

Keeper of app themes., (*3)

Requirements

ldrahnik/theme-keeper requires PHP 5.4 or higher., (*4)

Installation

Install theme keeper to your project using Composer:, (*5)

$ composer require ldrahnik/theme-keeper

Usage

Register extension in config file, (*6)

extensions:
    themes: ThemeKeeper\DI\ThemeKeeperExtension

Example

themes:
    default:
        themeDir: %themesDir%/<themeName>
        assetsDir: <themeDir>/assets
        views:
            controls: <themeDir>/controls/<name>/<view>
            presenters: <themeDir>/presenters/<name>/<view>
            layouts: <themeDir>/@<view>
    /**
    * @var \ThemeKeeper\ThemeKeeper 
    * @inject 
    */
    private $themes;

    public function __construct(ThemeKeeper\ThemeKeeper $themes)
    {
        $this->themes = $themes;
    }

    public function render()
    {
        $this->template->setFile($this->themes->getView($this->name, 'controls'));
        $this->template->render();
        // you can cast getView without getTheme('default') because default name is automatically default
        // theme for short use as that, if is not set up name 'default', is choosen first theme in order
    }

Is able to set up path via these patterns (don't count patterns through view-keeper - substitution is done successively) sh <themeName> <assetsDir> <themeDir>, (*7)

Summary

  • Template-keeper uses View-keeper but view-keeper as extension have still good use, for example Mail templates are the same for entire app.
  • Crossing from small app with view-keeper to something bigger is not hard because is possible to let code as it's, just use another service.

The Versions

17/09 2017

dev-master

9999999-dev https://github.com/ldrahnik/theme-keeper

Keeper of themes.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

05/04 2015
02/04 2015
29/03 2015

v1.0

1.0.0.0 https://github.com/ldrahnik/theme-keeper

Keeper of themes.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires