Exemplo n.º 1
0
<?php

/**
 * This is a simple content management system based on CakePHP.
 *
 * @version         1.0.x
 * @copyright       Copyright (C) by cool-code.ru
 * @license         http://www.opensource.org/licenses/mit-license.php MIT License
 * @author          Segrey Kalistratov <*****@*****.**>
 */
use Cake\Cache\Cache;
use Cake\Core\Plugin;
use Cake\Core\Configure;
use Union\Core\Hook\HookHelper;
use Union\Core\Hook\HookComponent;
Configure::load('Union/Extensions.plugins');
$pluginPath = Plugin::path('Union/Extensions');
/** @noinspection PhpIncludeInspection */
require_once $pluginPath . 'src' . DS . 'basics.php';
//  Setup themes cache configuration.
Cache::config('themes', array_merge(Configure::read('Cache.defaultConfig'), ['groups' => ['themes'], 'duration' => '+1 week']));
HookHelper::hook('Union/Core.Migration', 'Plugins');
HookComponent::hook('Union/Extensions.Theme');
Exemplo n.º 2
0
<?php

/**
 * This is a simple content management system based on CakePHP.
 *
 * @version         1.0.x
 * @copyright       Copyright (C) by cool-code.ru
 * @license         http://www.opensource.org/licenses/mit-license.php MIT License
 * @coder           Segrey Kalistratov <*****@*****.**>
 */
use Cake\Cache\Cache;
use Cake\Core\Configure;
use Union\Core\Hook\HookHelper;
use Union\Core\Hook\HookComponent;
if (!defined('USER_ROLE_ADMIN')) {
    define('USER_ROLE_ADMIN', 'admin');
}
if (!defined('USER_ROLE_REGISTER')) {
    define('USER_ROLE_REGISTER', 'register');
}
if (!defined('USER_ROLE_PUBLIC')) {
    define('USER_ROLE_PUBLIC', 'public');
}
Cache::config('auth', ['className' => 'File', 'duration' => '+300 seconds', 'path' => CACHE . 'auth' . DS . 'frontend' . DS, 'prefix' => 'auth_']);
Cache::config('auth_admin', ['className' => 'File', 'duration' => '+300 seconds', 'path' => CACHE . 'auth' . DS . 'backend' . DS, 'prefix' => 'auth_']);
HookHelper::hook('Union/Community.User');
HookHelper::hook('Union/Community.Roles');
HookComponent::hook('Union/Community.User');
HookComponent::hook('Union/Community.UserAuth');
HookComponent::hook('Union/Community.UserWatcher');
Exemplo n.º 3
0
<?php

/**
 * This is a simple content management system based on CakePHP.
 *
 * @version         1.0.x
 * @copyright       Copyright (C) by cool-code.ru
 * @license         http://www.opensource.org/licenses/mit-license.php MIT License
 * @author          Segrey Kalistratov <*****@*****.**>
 */
use Union\Core\Hook\HookHelper;
HookHelper::hook('Union/FileManager.FileManager', 'FileManager');
Exemplo n.º 4
0
<?php

/**
 * This is a simple content management system based on CakePHP.
 *
 * @version         1.0.x
 * @copyright       Copyright (C) by cool-code.ru
 * @license         http://www.opensource.org/licenses/mit-license.php MIT License
 * @author          Segrey Kalistratov <*****@*****.**>
 */
use Cake\Cache\Cache;
use Cake\Core\Configure;
use Union\Core\Hook\HookHelper;
use Union\Core\Hook\HookComponent;
HookHelper::hook('Union/Menus.Menus');
HookComponent::hook('Union/Menus.Menu');
//  Setup menus cache configuration.
Cache::config('menus', array_merge(Configure::read('Cache.defaultConfig'), ['groups' => ['menus']]));
//  Setup menu links cache configuration.
Cache::config('menu_links', array_merge(Configure::read('Cache.defaultConfig'), ['groups' => ['menu_links'], 'duration' => '+1 week']));
//  Setup home link cache configuration.
Cache::config('home_link', array_merge(Configure::read('Cache.defaultConfig'), ['groups' => ['home_link'], 'duration' => '+10 week']));
Exemplo n.º 5
0
<?php

/**
 * This is a simple content management system based on CakePHP.
 *
 * @version         1.0.x
 * @copyright       Copyright (C) by cool-code.ru
 * @license         http://www.opensource.org/licenses/mit-license.php MIT License
 * @author          Segrey Kalistratov <*****@*****.**>
 */
use Cake\Cache\Cache;
use Cake\Core\Configure;
use Union\Core\Hook\HookHelper;
use Union\Core\Hook\HookComponent;
//  Setup positions cache configuration.
Cache::config('positions', array_merge(Configure::read('Cache.defaultConfig'), ['groups' => ['positions'], 'duration' => '+1 week']));
HookHelper::hook('Union/Modules.Modules');
HookComponent::hook('Union/Modules.Module');
Exemplo n.º 6
0
<?php

/**
 * This is a simple content management system based on CakePHP.
 *
 * @version         1.0.x
 * @copyright       Copyright (C) by cool-code.ru
 * @license         http://www.opensource.org/licenses/mit-license.php MIT License
 * @coder           Segrey Kalistratov <*****@*****.**>
 */
use Union\Core\Hook\HookHelper;
HookHelper::hook('Union/TinyMce.TinyMCE');