/Translate/Lib/Translations.php
PHP | 28 lines | 14 code | 3 blank | 11 comment | 0 complexity | 567ef95148406633c003099ea9fc6e77 MD5 | raw file
- <?php
- /**
- * Translations
- *
- * @package Croogo.Translate.Lib
- * @author Rachman Chavik <rchavik@gmail.com>
- * @license http://www.opensource.org/licenses/mit-license.php The MIT License
- * @link http://www.croogo.org
- */
- class Translations {
- /**
- * Read configured Translate.models and hook the appropriate behaviors
- */
- public static function translateModels() {
- $path ='admin:true/plugin:translate/controller:translate/action:index/:id/';
- foreach (Configure::read('Translate.models') as $model => $config) {
- Croogo::hookBehavior($model, 'Translate.CroogoTranslate', $config);
- Croogo::hookAdminRowAction(
- Inflector::pluralize($model) . '/admin_index',
- __d('croogo', 'Translate'),
- $path . $model
- );
- }
- }
- }