[ Index ] |
|
Code source de LifeType 1.2.4 |
1 <?php 2 3 lt_include( PLOG_CLASS_PATH."class/database/dbobject.class.php" ); 4 5 /** 6 * Defines a custom field 7 * 8 * \ingroup DAO 9 */ 10 class CustomField extends DbObject 11 { 12 var $_name; 13 var $_type; 14 var $_description; 15 var $_id; 16 var $_blogId; 17 var $_searchable; 18 var $_hidden; 19 var $_defaultValue; 20 var $_fieldValues; 21 22 function CustomField( $name, $description, $type, $blogId, $hidden = false, $searchable = true, $id = -1 ) 23 { 24 $this->DbObject(); 25 $this->setName( $name ); 26 $this->_description = $description; 27 $this->_type = $type; 28 $this->_id = $id; 29 $this->_blogId = $blogId; 30 $this->_searchable = $searchable; 31 $this->_hidden = $hidden; 32 $this->_defaultValue = ""; 33 $this->_fieldValues = Array(); 34 35 $this->_fields = Array( 36 "field_name" => "getName", 37 "blog_id" => "getBlogId", 38 "field_description" => "getDescription", 39 "field_type" => "getType", 40 "hidden" => "getHidden", 41 "searchable" => "getSearchable", 42 "field_values" => "getFieldValues" 43 ); 44 } 45 46 function getBlogId() 47 { 48 return $this->_blogId; 49 } 50 51 function setBlogId( $blogId ) 52 { 53 $this->_blogId = $blogId; 54 } 55 56 function getId() 57 { 58 return $this->_id; 59 } 60 61 function setId( $id ) 62 { 63 $this->_id = $id; 64 } 65 66 function getName() 67 { 68 return $this->_name; 69 } 70 71 function setName( $name ) 72 { 73 lt_include( PLOG_CLASS_PATH."class/data/textfilter.class.php" ); 74 75 $this->_name = Textfilter::filterAllHTML( $name ); 76 } 77 78 function getType() 79 { 80 return $this->_type; 81 } 82 83 function setType( $type ) 84 { 85 $this->_type = $type; 86 } 87 88 function getDescription() 89 { 90 return $this->_description; 91 } 92 93 function setDescription( $description ) 94 { 95 $this->_description = $description; 96 } 97 98 function getSearchable() 99 { 100 if( $this->_searchable == 1 ) 101 return 1; 102 else 103 return 0; 104 } 105 106 function isSearchable() 107 { 108 return $this->getSearchable(); 109 } 110 111 function getHidden() 112 { 113 if( $this->_hidden == 1 ) 114 return 1; 115 else 116 return 0; 117 } 118 119 function isHidden() 120 { 121 return $this->getHidden(); 122 } 123 124 function setHidden( $hidden ) 125 { 126 $this->_hidden = $hidden; 127 } 128 129 function setSearchable( $searchable ) 130 { 131 $this->searchable = $searchable; 132 } 133 134 function getDefaultValue() 135 { 136 return $this->_defaultValue; 137 } 138 139 function getFieldValues() 140 { 141 return( $this->_fieldValues ); 142 } 143 144 function setFieldValues( $values ) 145 { 146 $this->_fieldValues = $values; 147 } 148 } 149 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 21:04:15 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |