[ Index ] |
|
Code source de b2evolution 2.1.0-beta |
1 <?php 2 /** 3 * This file implements the Item Type class. 4 * 5 * This file is part of the evoCore framework - {@link http://evocore.net/} 6 * See also {@link http://sourceforge.net/projects/evocms/}. 7 * 8 * @copyright (c)2003-2007 by Francois PLANQUE - {@link http://fplanque.net/} 9 * Parts of this file are copyright (c)2005-2006 by PROGIDISTRI - {@link http://progidistri.com/}. 10 * 11 * {@internal License choice 12 * - If you have received this file as part of a package, please find the license.txt file in 13 * the same folder or the closest folder above for complete license terms. 14 * - If you have received this file individually (e-g: from http://evocms.cvs.sourceforge.net/) 15 * then you must choose one of the following licenses before using the file: 16 * - GNU General Public License 2 (GPL) - http://www.opensource.org/licenses/gpl-license.php 17 * - Mozilla Public License 1.1 (MPL) - http://www.opensource.org/licenses/mozilla1.1.php 18 * }} 19 * 20 * {@internal Open Source relicensing agreement: 21 * PROGIDISTRI S.A.S. grants Francois PLANQUE the right to license 22 * PROGIDISTRI S.A.S.'s contributions to this file and the b2evolution project 23 * under any OSI approved OSS license (http://www.opensource.org/licenses/). 24 * }} 25 * 26 * @package evocore 27 * 28 * {@internal Below is a list of authors who have contributed to design/coding of this file: }} 29 * @author fplanque: Francois PLANQUE. 30 * @author mbruneau: Marc BRUNEAU / PROGIDISTRI 31 * 32 * @version $Id: _itemtype.class.php,v 1.1 2007/06/25 11:00:28 fplanque Exp $ 33 */ 34 if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' ); 35 36 load_class('_core/model/dataobjects/_dataobject.class.php'); 37 38 /** 39 * ItemType Class 40 * 41 * @package evocore 42 */ 43 class ItemType extends DataObject 44 { 45 var $name; 46 47 48 /** 49 * Constructor 50 * 51 * 52 * @param table Database row 53 */ 54 function ItemType( $db_row = NULL ) 55 { 56 // Call parent constructor: 57 parent::DataObject( 'T_items__type', 'ptyp_', 'ptyp_ID' ); 58 59 $this->delete_restrictions = array( 60 array( 'table'=>'T_ityp_col', 'fk'=>'itco_ityp_ID', 'msg'=>T_('%d related collections') ), // "Lignes de missions" 61 array( 'table'=>'T_items__item', 'fk'=>'post_ptyp_ID', 'msg'=>T_('%d related items') ), // "Lignes de visit reports" 62 ); 63 64 if( $db_row != NULL ) 65 { 66 $this->ID = $db_row->ptyp_ID ; 67 $this->name = $db_row->ptyp_name ; 68 } 69 } 70 71 /** 72 * Get the name of the ItemType 73 * @return string 74 */ 75 function get_name() 76 { 77 return $this->name; 78 } 79 } 80 81 /* 82 * $Log: _itemtype.class.php,v $ 83 * Revision 1.1 2007/06/25 11:00:28 fplanque 84 * MODULES (refactored MVC) 85 * 86 */ 87 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Thu Nov 29 23:58:50 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |