forked from civicrm/civicrm-core
/
Worldregion.php
151 lines (130 loc) · 4.17 KB
/
Worldregion.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<?php
/*
+--------------------------------------------------------------------+
| CiviCRM version 4.4 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2013 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| CiviCRM is free software; you can copy, modify, and distribute it |
| under the terms of the GNU Affero General Public License |
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
| |
| CiviCRM is distributed in the hope that it will be useful, but |
| WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| See the GNU Affero General Public License for more details. |
| |
| You should have received a copy of the GNU Affero General Public |
| License and the CiviCRM Licensing Exception along |
| with this program; if not, contact CiviCRM LLC |
| at info[AT]civicrm[DOT]org. If you have questions about the |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*/
/**
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2013
*
* Generated from xml/schema/CRM/Core/Worldregion.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
*/
namespace Civi\Core;
require_once 'Civi/Core/Entity.php';
use Doctrine\ORM\Mapping as ORM;
use Hateoas\Configuration\Annotation as Hateoas;
use Civi\API\Annotation as CiviAPI;
use JMS\Serializer\Annotation as JMS;
/**
* Worldregion
*
* @CiviAPI\Entity("WorldRegion", slug="world-region")
* @CiviAPI\Permission(get="access CiviCRM")
* @ORM\Table(name="civicrm_worldregion")
* @ORM\Entity
* @Hateoas\Relation("self",
* href = @Hateoas\Route(
* "WorldRegion_get",
* parameters = { "id" = "expr(object.getId())" },
* absolute = true,
* generator = "civi"
* )
* )
*/
class Worldregion extends \Civi\Core\Entity {
/**
* @var integer
*
* @JMS\Type("integer")
* @ORM\Column(name="id", type="integer", nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
/**
* @var string
*
* @JMS\Type("string")
* @ORM\Column(name="name", type="string", length=128, nullable=true)
*
*/
private $name;
/**
* Get id
*
* @return integer
*/
public function getId() {
return $this->id;
}
/**
* Set name
*
* @param string $name
* @return Worldregion
*/
public function setName($name) {
$this->name = $name;
return $this;
}
/**
* Get name
*
* @return string
*/
public function getName() {
return $this->name;
}
/**
* returns all the column names of this table
*
* @access public
* @return array
*/
static function &fields( ) {
if ( !self::$_fields) {
self::$_fields = array (
'id' => array(
'name' => 'id',
'type' => CRM_Utils_Type::T_INT,
'required' => true,
),
'world_region' => array(
'name' => 'name',
'type' => CRM_Utils_Type::T_STRING,
'title' => ts('World Region'),
'maxlength' => 128,
'size' => CRM_Utils_Type::HUGE,
'export' => true,
'where' => 'civicrm_worldregion.name',
'headerPattern' => '',
'dataPattern' => '',
),
);
}
return self::$_fields;
}
}