zacksleo/yii-plugin

yii plugin module

0.0.1 2018-05-08 06:26 UTC

This package is auto-updated.

Last update: 2024-11-08 07:29:24 UTC


README

Yii-Plugin with Composer implementation

Quick Start

Install by Composer

composer require zacksleo/yii-plugin

Config

config in main.php

    'modules' => [
        //'admin',
        'plugin' => [
            'class' => 'zacksleo\yii\plugin\PluginModule',
            'layout' => 'layout', // your layout
            'layoutPath' => dirname(__DIR__) . '/modules/admin/views/layouts/', // your layout path
            'pluginRoot' => 'webroot.plugins'
        ]
    ],

    'components'=>[
        //... other config
         'plugin' =>[
             'class' => 'zacksleo\yii\plugin\components\HookRender',
        ],  
    ]

Set Hooks in View

<?php Yii::app()->plugin->render('global_footer'); >

More

More docs see health901/Yii-Plugin