| @@ 113-122 (lines=10) @@ | ||
| 110 | * |
|
| 111 | * @return string|null |
|
| 112 | */ |
|
| 113 | public function getFieldType($entity, $field) |
|
| 114 | { |
|
| 115 | $type = null; |
|
| 116 | $mapping = $this->getFieldMapping($entity, $field); |
|
| 117 | if (isset($mapping[self::MAPPING_KEY_TYPE])) { |
|
| 118 | $type = $mapping[self::MAPPING_KEY_TYPE]; |
|
| 119 | } |
|
| 120 | ||
| 121 | return $type; |
|
| 122 | } |
|
| 123 | ||
| 124 | /** |
|
| 125 | * Is the field nullable from mapping (default:true) |
|
| @@ 325-334 (lines=10) @@ | ||
| 322 | * |
|
| 323 | * @return string|null |
|
| 324 | */ |
|
| 325 | public function getFieldColumn($entity, $field) |
|
| 326 | { |
|
| 327 | $column = $field; |
|
| 328 | $mapping = $this->getFieldMapping($entity, $field); |
|
| 329 | if (isset($mapping[self::MAPPING_KEY_COLUMN])) { |
|
| 330 | $column = $mapping[self::MAPPING_KEY_COLUMN]; |
|
| 331 | } |
|
| 332 | ||
| 333 | return $column; |
|
| 334 | } |
|
| 335 | } |
|
| 336 | ||