Base for a static organization website

i18n.php 2.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?php
  2. /**
  3. * This is i18n Schema file
  4. *
  5. * Use it to configure database for i18n
  6. *
  7. * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  8. * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  9. *
  10. * Licensed under The MIT License
  11. * For full copyright and license information, please see the LICENSE.txt
  12. * Redistributions of files must retain the above copyright notice.
  13. *
  14. * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  15. * @link http://cakephp.org CakePHP(tm) Project
  16. * @package app.Config.Schema
  17. * @since CakePHP(tm) v 0.2.9
  18. * @license http://www.opensource.org/licenses/mit-license.php MIT License
  19. */
  20. /**
  21. * Using the Schema command line utility
  22. *
  23. * Use it to configure database for i18n
  24. *
  25. * cake schema run create i18n
  26. */
  27. class I18nSchema extends CakeSchema {
  28. /**
  29. * The name property
  30. *
  31. * @var string
  32. */
  33. public $name = 'i18n';
  34. /**
  35. * Before callback.
  36. *
  37. * @param array $event Schema object properties
  38. * @return bool Should process continue
  39. */
  40. public function before($event = array()) {
  41. return true;
  42. }
  43. /**
  44. * After callback.
  45. *
  46. * @param array $event Schema object properties
  47. * @return void
  48. */
  49. public function after($event = array()) {
  50. }
  51. /**
  52. * The i18n table definition
  53. *
  54. * @var array
  55. */
  56. public $i18n = array(
  57. 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'),
  58. 'locale' => array('type' => 'string', 'null' => false, 'length' => 6, 'key' => 'index'),
  59. 'model' => array('type' => 'string', 'null' => false, 'key' => 'index'),
  60. 'foreign_key' => array('type' => 'integer', 'null' => false, 'length' => 10, 'key' => 'index'),
  61. 'field' => array('type' => 'string', 'null' => false, 'key' => 'index'),
  62. 'content' => array('type' => 'text', 'null' => true, 'default' => null),
  63. 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'locale' => array('column' => 'locale', 'unique' => 0), 'model' => array('column' => 'model', 'unique' => 0), 'row_id' => array('column' => 'foreign_key', 'unique' => 0), 'field' => array('column' => 'field', 'unique' => 0))
  64. );
  65. }