Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a506197
commit 8f97d06
Showing
2 changed files
with
62 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,57 @@ | ||
<?php | ||
/** | ||
* @brief ConfigsEvents for the Configs plugin to attach into the application | ||
* | ||
* @copyright Copyright (c) 2010 Carl Sutton ( dogmatic69 ) | ||
* @link http://www.infinitas-cms.org | ||
* @package Infinitas.Configs | ||
* @license http://www.opensource.org/licenses/mit-license.php The MIT License | ||
* @since 0.8a | ||
* | ||
* @author dogmatic69 | ||
* | ||
* Licensed under The MIT License | ||
* Redistributions of files must retain the above copyright notice. | ||
*/ | ||
/** | ||
* @brief ConfigsEvents for the Configs plugin to attach into the application | ||
* | ||
* @copyright Copyright (c) 2010 Carl Sutton ( dogmatic69 ) | ||
* @link http://www.infinitas-cms.org | ||
* @package Infinitas.Configs | ||
* @license http://www.opensource.org/licenses/mit-license.php The MIT License | ||
* @since 0.8a | ||
* | ||
* @author dogmatic69 | ||
* | ||
* Licensed under The MIT License | ||
* Redistributions of files must retain the above copyright notice. | ||
*/ | ||
|
||
final class ConfigsEvents extends AppEvents { | ||
class ConfigsEvents extends AppEvents { | ||
/** | ||
* @brief get the cache config for this plugin | ||
* | ||
* @return array | ||
*/ | ||
public function onSetupCache() { | ||
return array( | ||
'name' => 'configs', | ||
'config' => array( | ||
'prefix' => 'core.configs.', | ||
) | ||
); | ||
} | ||
|
||
public function onSetupCache() { | ||
return array( | ||
'name' => 'configs', | ||
'config' => array( | ||
'prefix' => 'core.configs.', | ||
) | ||
); | ||
} | ||
/** | ||
* @brief get the admin menu | ||
* | ||
* @return array | ||
*/ | ||
public function onAdminMenu($event) { | ||
$menu['main'] = array( | ||
'Dashboard' => array('plugin' => 'management', 'controller' => 'management', 'action' => 'site'), | ||
'Configuration' => array('plugin' => 'configs', 'controller' => 'configs', 'action' => 'index'), | ||
'Available' => array('plugin' => 'configs', 'controller' => 'configs', 'action' => 'available') | ||
); | ||
|
||
public function onAdminMenu($event) { | ||
$menu['main'] = array( | ||
'Dashboard' => array('plugin' => 'management', 'controller' => 'management', 'action' => 'site'), | ||
'Configuration' => array('plugin' => 'configs', 'controller' => 'configs', 'action' => 'index'), | ||
'Available' => array('plugin' => 'configs', 'controller' => 'configs', 'action' => 'available') | ||
); | ||
return $menu; | ||
} | ||
|
||
return $menu; | ||
} | ||
|
||
public function onGetRequiredFixtures($event) { | ||
return array( | ||
'Configs.Config', | ||
); | ||
} | ||
} | ||
/** | ||
* @brief get required fixtures | ||
* | ||
* @return array | ||
*/ | ||
public function onGetRequiredFixtures($event) { | ||
return array( | ||
'Configs.Config', | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,11 @@ | ||
<?php | ||
class ConfigsEventsTest extends CakeTestCase { | ||
var $fixturesasd = array( | ||
'plugin.configs.config', | ||
'plugin.themes.theme', | ||
'plugin.routes.route', | ||
'plugin.view_counter.view_counter_view', | ||
|
||
'plugin.categories.category', | ||
'plugin.users.group', | ||
); | ||
|
||
public function startTest() { | ||
$this->Event = EventCore::getInstance(); | ||
} | ||
|
||
public function endTest() { | ||
unset($this->Event); | ||
ClassRegistry::flush(); | ||
} | ||
|
||
public function testGenerateSiteMapData() { | ||
$this->assertInstanceOf('EventCore', $this->Event); | ||
} | ||
} | ||
/** | ||
* @brief ConfigsEventsTest | ||
* | ||
* These tests are extended from InfinitasEventTestCase which does most of the | ||
* automated testing for simple events | ||
*/ | ||
App::uses('InfinitasEventTestCase', 'Events.Test/Lib'); | ||
class ConfigsEventsTest extends InfinitasEventTestCase { | ||
|
||
} |