-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding the method to get plugins here so it can be used anywere
- Loading branch information
1 parent
62e3807
commit a1fb9ed
Showing
1 changed file
with
53 additions
and
35 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,36 +1,54 @@ | ||
<?php | ||
/** | ||
* Comment Template. | ||
* | ||
* @todo Implement .this needs to be sorted out. | ||
* | ||
* Copyright (c) 2009 Carl Sutton ( dogmatic69 ) | ||
* | ||
* Licensed under The MIT License | ||
* Redistributions of files must retain the above copyright notice. | ||
* @filesource | ||
* @copyright Copyright (c) 2009 Carl Sutton ( dogmatic69 ) | ||
* @link http://infinitas-cms.org | ||
* @package sort | ||
* @subpackage sort.comments | ||
* @license http://www.opensource.org/licenses/mit-license.php The MIT License | ||
* @since 0.5a | ||
*/ | ||
|
||
class AppModel extends Model { | ||
/** | ||
* The database configuration to use for the site. | ||
*/ | ||
var $useDbConfig = 'default'; | ||
|
||
/** | ||
* Behaviors to attach to the site. | ||
*/ | ||
var $actsAs = array( | ||
'Containable', | ||
'Libs.Lockable', | ||
'Libs.Logable' | ||
); | ||
} | ||
|
||
<?php | ||
/** | ||
* Comment Template. | ||
* | ||
* @todo Implement .this needs to be sorted out. | ||
* | ||
* Copyright (c) 2009 Carl Sutton ( dogmatic69 ) | ||
* | ||
* Licensed under The MIT License | ||
* Redistributions of files must retain the above copyright notice. | ||
* @filesource | ||
* @copyright Copyright (c) 2009 Carl Sutton ( dogmatic69 ) | ||
* @link http://infinitas-cms.org | ||
* @package sort | ||
* @subpackage sort.comments | ||
* @license http://www.opensource.org/licenses/mit-license.php The MIT License | ||
* @since 0.5a | ||
*/ | ||
|
||
class AppModel extends Model { | ||
/** | ||
* The database configuration to use for the site. | ||
*/ | ||
var $useDbConfig = 'default'; | ||
|
||
/** | ||
* Behaviors to attach to the site. | ||
*/ | ||
var $actsAs = array( | ||
'Containable', | ||
'Libs.Lockable', | ||
'Libs.Logable' | ||
); | ||
|
||
var $blockedPlugins = array( | ||
'DebugKit', | ||
'Filter', | ||
'Libs' | ||
); | ||
|
||
function getPlugins(){ | ||
$plugins = Configure::listObjects('plugin'); | ||
|
||
foreach($plugins as $plugin){ | ||
if (!in_array($plugin, $this->blockedPlugins)){ | ||
$return[Inflector::underscore($plugin)] = $plugin; | ||
} | ||
} | ||
|
||
return array('' => 'None') + (array)$return; | ||
} | ||
} | ||
|
||
?> |