PageRenderTime 36ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/contentmanager/code/trunk/administrator/components/com_contentmanager/tables/template.php

https://bitbucket.org/eddieajau/the-art-of-joomla-archive
PHP | 84 lines | 30 code | 3 blank | 51 comment | 2 complexity | 05d9c01a06b863cea299fe4d0d0f86af MD5 | raw file
  1. <?php
  2. /**
  3. * @version $Id: template.php 52 2009-05-25 11:26:19Z eddieajau $
  4. * @copyright Copyright (C) 2009 New Life in IT Pty Ltd. All rights reserved.
  5. * @license GNU General Public License <http://www.gnu.org/copyleft/gpl.html>
  6. * @link http://www.theartofjoomla.com
  7. */
  8. // no direct access
  9. defined('_JEXEC') or die;
  10. /**
  11. * @package TAOJ.ContentManager
  12. * @subpackage com_contentmanager
  13. */
  14. class ContentManagerTableTemplate extends JTable
  15. {
  16. /**
  17. * @var int unsigned
  18. */
  19. var $id = null;
  20. /**
  21. * @var varchar
  22. */
  23. var $title = null;
  24. /**
  25. * @var varchar
  26. */
  27. var $icon = null;
  28. /**
  29. * @var text
  30. */
  31. var $description = null;
  32. /**
  33. * @var text
  34. */
  35. var $body = null;
  36. /**
  37. * @var tinyint
  38. */
  39. var $published = null;
  40. /**
  41. * @var int
  42. */
  43. var $created_user_id = null;
  44. /**
  45. * @var datetime
  46. */
  47. var $created_date = null;
  48. /**
  49. * @var int
  50. */
  51. var $modified_user_id = null;
  52. /**
  53. * @var datetime
  54. */
  55. var $modified_date = null;
  56. /**
  57. * @var int
  58. */
  59. var $checked_out = null;
  60. /**
  61. * @var datetime
  62. */
  63. var $checked_out_time = null;
  64. /**
  65. * @param database A database connector object
  66. */
  67. function __construct(&$db)
  68. {
  69. parent::__construct('#__taoj_contentmanager_xmltemplates', 'id', $db);
  70. }
  71. function check()
  72. {
  73. // check for valid name
  74. if (trim($this->title) == '')
  75. {
  76. $this->_error = JText::_('Record must contain a title');
  77. return false;
  78. }
  79. return true;
  80. }
  81. }