Beispiel #1
0
 *
 * Inflector::rules('plural', ['/^(inflect)or$/i' => '\1ables']);
 * Inflector::rules('irregular', ['red' => 'redlings']);
 * Inflector::rules('uninflected', ['dontinflectme']);
 * Inflector::rules('transliteration', ['/å/' => 'aa']);
 */
/**
 * Plugins need to be loaded manually, you can either load them one by one or all of them in a single call
 * Uncomment one of the lines below, as you need. make sure you read the documentation on Plugin to use more
 * advanced ways of loading plugins
 *
 * Plugin::loadAll(); // Loads all plugins at once
 * Plugin::load('Migrations'); //Loads a single plugin named Migrations
 *
 */
Plugin::loadAll();
// Only try to load DebugKit in development mode
// Debug Kit should not be installed on a production system
if (Configure::read('debug')) {
    Plugin::load('DebugKit', ['bootstrap' => true]);
}
/**
 * Connect middleware/dispatcher filters.
 */
DispatcherFactory::add('Asset');
DispatcherFactory::add('Routing');
DispatcherFactory::add('ControllerFactory');
/**
 * Enable default locale format parsing.
 * This is needed for matching the auto-localized string output of Time() class when parsing dates.
 */
<?php

use Cake\Core\Plugin;
use Cake\Core\Configure;
use Cake\Routing\Router;
Plugin::loadAll([['ignoreMissing' => true, 'bootstrap' => true], 'Editorial/Core' => ['routes' => true]]);
Configure::write('Summernote.elFinder', ['debug' => false, 'roots' => [['primary' => true, 'driver' => 'LocalFileSystem', 'alias' => __('Uploads folder'), 'path' => ROOT . DS . Configure::read('App.webroot') . DS . 'files' . DS, 'URL' => Router::url('/', true) . 'files/', 'uploadDeny' => array('all'), 'uploadAllow' => array('image', 'text/plain'), 'uploadOrder' => array('deny', 'allow'), 'accessControl' => 'finder_access']]]);
function finder_access($attr, $path, $data, $volume)
{
    return strpos(basename($path), '.') === 0 ? !($attr == 'read' || $attr == 'write') : null;
    // else elFinder decide it itself
}
Beispiel #3
0
 /**
  * Tests that Plugin::loadAll() will load all plgins in the configured folder wit defaults
  * and overrides for a plugin
  *
  * @return void
  */
 public function testLoadAllWithDefaultsAndOverride()
 {
     Plugin::loadAll(array(array('bootstrap' => true, 'ignoreMissing' => true), 'TestPlugin' => array('routes' => true)));
     Plugin::routes();
     $expected = ['Company', 'PluginJs', 'TestPlugin', 'TestPluginTwo'];
     $this->assertEquals($expected, Plugin::loaded());
     $this->assertEquals('loaded js plugin bootstrap', Configure::read('PluginTest.js_plugin.bootstrap'));
     $this->assertEquals('loaded plugin routes', Configure::read('PluginTest.test_plugin.routes'));
     $this->assertEquals(null, Configure::read('PluginTest.test_plugin.bootstrap'));
     $this->assertEquals('loaded plugin two bootstrap', Configure::read('PluginTest.test_plugin_two.bootstrap'));
 }
<?php

/**
 * Licensed under The MIT License
 * For full copyright and license information, please see the LICENSE.txt
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright     Copyright (c) MindForce Team (http://mindforce.me)
 * @link          http://mindforce.me Garderobe Jquery Plugin
 * @since         0.0.1
 * @license       http://www.opensource.org/licenses/mit-license.php MIT License
 */
use Cake\Core\Configure;
use Cake\Core\Plugin;
Plugin::loadAll([['ignoreMissing' => true, 'bootstrap' => true, 'routes' => true], 'Garderobe/Core']);
Configure::write('Garderobe.Plugin.Jquery', ['name' => 'Garderobe/Jquery']);
Beispiel #5
0
 /**
  * test that a helpers Helper is not 'attached' to the collection
  *
  * @return void
  */
 public function testThatHelperHelpersAreNotAttached()
 {
     Plugin::loadAll();
     $events = $this->getMock('\\Cake\\Event\\EventManager');
     $this->View->setEventManager($events);
     $events->expects($this->never())->method('attach');
     $Helper = new TestHelper($this->View);
     $Helper->OtherHelper;
 }
<?php

/**
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright     Copyright (c) Mindforce Team (http://mindforce.me)
* @link          http://mindforce.me RearEngine CakePHP 3 Plugin
* @since         0.0.1
* @license       http://www.opensource.org/licenses/mit-license.php MIT License
*/
use Cake\Core\Configure;
use Cake\Database\Type;
use Cake\Core\App;
use Cake\Event\EventManager;
use Cake\Core\Plugin;
Plugin::loadAll([['ignoreMissing' => true, 'bootstrap' => true, 'routes' => true], 'Platform', 'Garderobe/Bootstrap3', 'Garderobe/BootstrapKit', 'PlumSearch', 'Search']);
// Setup RearEngine as theme does not provide layout and view overriding
// so we just add it as additional templates path
Configure::write('App.paths.templates', array_merge([APP . 'Template' . DS . 'Plugin' . DS . 'RearEngine' . DS], App::path('Template', 'RearEngine'), App::path('Template')));
Configure::write('Routing.prefixes', ['admin']);
EventManager::instance()->attach(new RearEngine\Event\CoreEvent(), null, ['priority' => 2]);
Beispiel #7
0
 *
 * Inflector::rules('plural', ['/^(inflect)or$/i' => '\1ables']);
 * Inflector::rules('irregular', ['red' => 'redlings']);
 * Inflector::rules('uninflected', ['dontinflectme']);
 * Inflector::rules('transliteration', ['/å/' => 'aa']);
 */
/**
 * Plugins need to be loaded manually, you can either load them one by one or all of them in a single call
 * Uncomment one of the lines below, as you need. make sure you read the documentation on Plugin to use more
 * advanced ways of loading plugins
 *
 * Plugin::loadAll(); // Loads all plugins at once
 * Plugin::load('Migrations'); //Loads a single plugin named Migrations
 *
 */
Plugin::loadAll(['Admin' => ['bootstrap' => false, 'routes' => true, 'ignoreMissing' => true], 'System' => ['bootstrap' => false, 'routes' => true, 'ignoreMissing' => true], 'Api' => ['bootstrap' => false, 'routes' => true, 'ignoreMissing' => true], 'Page' => ['bootstrap' => false, 'routes' => true, 'ignoreMissing' => true], 'Social' => ['bootstrap' => false, 'routes' => true, 'ignoreMissing' => true], 'Setting' => ['bootstrap' => false, 'routes' => true, 'ignoreMissing' => true]]);
Plugin::load('Migrations');
// Only try to load DebugKit in development mode
// Debug Kit should not be installed on a production system
if (Configure::read('debug')) {
    Plugin::load('DebugKit', ['bootstrap' => true]);
}
/**
 * Connect middleware/dispatcher filters.
 */
DispatcherFactory::add('Asset');
DispatcherFactory::add('Routing');
DispatcherFactory::add('ControllerFactory');
/**
 * Enable default locale format parsing.
 * This is needed for matching the auto-localized string output of Time() class when parsing dates.
Beispiel #8
0
 /**
  * Tests that Plugin::loadAll() will load all plugins in the configured folder wit defaults
  * and overrides for a plugin
  *
  * @return void
  */
 public function testLoadAllWithDefaultsAndOverride()
 {
     Plugin::loadAll([['bootstrap' => true, 'ignoreMissing' => true], 'TestPlugin' => ['routes' => true], 'TestPluginFour' => ['bootstrap' => true, 'classBase' => '']]);
     Plugin::routes();
     $expected = ['Company', 'PluginJs', 'TestPlugin', 'TestPluginFour', 'TestPluginTwo', 'TestTheme'];
     $this->assertEquals($expected, Plugin::loaded());
     $this->assertEquals('loaded js plugin bootstrap', Configure::read('PluginTest.js_plugin.bootstrap'));
     $this->assertEquals('loaded plugin routes', Configure::read('PluginTest.test_plugin.routes'));
     $this->assertEquals(null, Configure::read('PluginTest.test_plugin.bootstrap'));
     $this->assertEquals('loaded plugin two bootstrap', Configure::read('PluginTest.test_plugin_two.bootstrap'));
     $this->assertEquals('loaded plugin four bootstrap', Configure::read('PluginTest.test_plugin_four.bootstrap'));
     // TestPluginThree won't get loaded by loadAll() since it's in a sub directory.
     $this->assertEquals(null, Configure::read('PluginTest.test_plugin_three.bootstrap'));
 }
<?php

/**
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright     Copyright (c) Mindforce Team (http://mindforce.me)
* @link          http://mindforce.me FrontEngine CakePHP 3 Plugin
* @since         0.0.1
* @license       http://www.opensource.org/licenses/mit-license.php MIT License
*/
use Cake\Event\EventManager;
use Cake\Core\Plugin;
Plugin::loadAll([['ignoreMissing' => true, 'bootstrap' => true, 'routes' => true], 'Garderobe/Bootstrap3', 'RearEngine']);
EventManager::instance()->attach(new FrontEngine\Event\CoreEvent(), null, ['priority' => 2]);
Beispiel #10
0
 * Inflector::rules('uninflected', ['dontinflectme']);
 * Inflector::rules('transliteration', ['/å/' => 'aa']);
 */
/**
 * Plugins need to be loaded manually, you can either load them one by one or all of them in a single call
 * Uncomment one of the lines below, as you need. make sure you read the documentation on Plugin to use more
 * advanced ways of loading plugins
 *
 * Plugin::loadAll(); // Loads all plugins at once
 * Plugin::load('Migrations'); //Loads a single plugin named Migrations
 *
 */
Plugin::load('Migrations');
// Only try to load DebugKit in development mode
// Debug Kit should not be installed on a production system
if (Configure::read('debug')) {
    Plugin::load('DebugKit', ['bootstrap' => true]);
}
/**
 * Connect middleware/dispatcher filters.
 */
DispatcherFactory::add('Asset');
DispatcherFactory::add('Routing');
DispatcherFactory::add('ControllerFactory');
/**
 * Enable default locale format parsing.
 * This is needed for matching the auto-localized string output of Time() class when parsing dates.
 */
Type::build('datetime')->useLocaleParser();
Plugin::loadAll(['Block' => ['bootstrap' => true, 'routes' => false], 'CMS' => ['bootstrap' => true], 'Menu' => ['bootstrap' => true, 'routes' => false]]);
Beispiel #11
0
 */
Type::build('time')->useImmutable();
Type::build('date')->useImmutable();
Type::build('datetime')->useImmutable();
/*
 * Custom Inflector rules, can be set to correctly pluralize or singularize
 * table, model, controller names or whatever other string is passed to the
 * inflection functions.
 */
//Inflector::rules('plural', ['/^(inflect)or$/i' => '\1ables']);
//Inflector::rules('irregular', ['red' => 'redlings']);
//Inflector::rules('uninflected', ['dontinflectme']);
//Inflector::rules('transliteration', ['/å/' => 'aa']);
/*
 * Plugins need to be loaded manually, you can either load them one by one or all of them in a single call
 * Uncomment one of the lines below, as you need. make sure you read the documentation on Plugin to use more
 * advanced ways of loading plugins
 *
 * Plugin::loadAll(); // Loads all plugins at once
 * Plugin::load('Migrations'); //Loads a single plugin named Migrations
 *
 */
/*
 * Only try to load DebugKit in development mode
 * Debug Kit should not be installed on a production system
 */
if (Configure::read('debug')) {
    Plugin::load('DebugKit', ['bootstrap' => true]);
}
Plugin::loadAll(['routes' => true]);
include "cakeblog-config.php";