| [ Index ] |
PHP Cross Reference of Joomla 2.5.4 DE |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * @package Joomla.Platform 4 * @subpackage Database 5 * 6 * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved. 7 * @license GNU General Public License version 2 or later; see LICENSE 8 */ 9 10 defined('JPATH_PLATFORM') or die; 11 12 jimport('joomla.database.table'); 13 jimport('joomla.database.tableasset'); 14 15 /** 16 * Module table 17 * 18 * @package Joomla.Platform 19 * @subpackage Table 20 * @since 11.1 21 */ 22 class JTableModule extends JTable 23 { 24 /** 25 * Constructor. 26 * 27 * @param JDatabase &$db A database connector object 28 * 29 * @since 11.1 30 */ 31 public function __construct(&$db) 32 { 33 parent::__construct('#__modules', 'id', $db); 34 35 $this->access = (int) JFactory::getConfig()->get('access'); 36 } 37 38 /** 39 * Overloaded check function. 40 * 41 * @return boolean True if the instance is sane and able to be stored in the database. 42 * 43 * @see JTable::check 44 * @since 11.1 45 */ 46 public function check() 47 { 48 // check for valid name 49 if (trim($this->title) == '') 50 { 51 $this->setError(JText::_('JLIB_DATABASE_ERROR_MUSTCONTAIN_A_TITLE_MODULE')); 52 return false; 53 } 54 55 // Check the publish down date is not earlier than publish up. 56 if (intval($this->publish_down) > 0 && $this->publish_down < $this->publish_up) 57 { 58 $this->setError(JText::_('JGLOBAL_START_PUBLISH_AFTER_FINISH')); 59 return false; 60 } 61 62 return true; 63 } 64 65 /** 66 * Overloaded bind function. 67 * 68 * @param array $array Named array. 69 * @param mixed $ignore An optional array or space separated list of properties to ignore while binding. 70 * 71 * @return mixed Null if operation was satisfactory, otherwise returns an error 72 * 73 * @see JTable::bind 74 * @since 11.1 75 */ 76 public function bind($array, $ignore = '') 77 { 78 if (isset($array['params']) && is_array($array['params'])) 79 { 80 $registry = new JRegistry; 81 $registry->loadArray($array['params']); 82 $array['params'] = (string) $registry; 83 } 84 85 return parent::bind($array, $ignore); 86 } 87 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Tue Apr 3 11:40:28 2012 | Cross-referenced by PHPXref 0.7.1 |