|
@@ 361-380 (lines=20) @@
|
| 358 |
|
* |
| 359 |
|
* @return array The array with the default column values |
| 360 |
|
*/ |
| 361 |
|
public function getDefaultColumnValues() |
| 362 |
|
{ |
| 363 |
|
|
| 364 |
|
// initialize the array for the default column values |
| 365 |
|
$defaultColumnValues = array(); |
| 366 |
|
|
| 367 |
|
// load the entity type from the execution context |
| 368 |
|
$entityTypeCode = $this->getExecutionContext()->getEntityTypeCode(); |
| 369 |
|
|
| 370 |
|
// load the column values from the configuration |
| 371 |
|
$columnValues = $this->getConfiguration()->getDefaultValues(); |
| 372 |
|
|
| 373 |
|
// query whether or not default column values for the entity type are available |
| 374 |
|
if (isset($columnValues[$entityTypeCode])) { |
| 375 |
|
$defaultColumnValues = $columnValues[$entityTypeCode]; |
| 376 |
|
} |
| 377 |
|
|
| 378 |
|
// return the default column values |
| 379 |
|
return $defaultColumnValues; |
| 380 |
|
} |
| 381 |
|
|
| 382 |
|
/** |
| 383 |
|
* Load the default header mappings from the configuration. |
|
@@ 387-406 (lines=20) @@
|
| 384 |
|
* |
| 385 |
|
* @return array The array with the default header mappings |
| 386 |
|
*/ |
| 387 |
|
public function getDefaultHeaderMappings() |
| 388 |
|
{ |
| 389 |
|
|
| 390 |
|
// initialize the array for the default header mappings |
| 391 |
|
$defaultHeaderMappings = array(); |
| 392 |
|
|
| 393 |
|
// load the entity type from the execution context |
| 394 |
|
$entityTypeCode = $this->getExecutionContext()->getEntityTypeCode(); |
| 395 |
|
|
| 396 |
|
// load the header mappings from the configuration |
| 397 |
|
$headerMappings = $this->getConfiguration()->getHeaderMappings(); |
| 398 |
|
|
| 399 |
|
// query whether or not header mappings for the entity type are available |
| 400 |
|
if (isset($headerMappings[$entityTypeCode])) { |
| 401 |
|
$defaultHeaderMappings = $headerMappings[$entityTypeCode]; |
| 402 |
|
} |
| 403 |
|
|
| 404 |
|
// return the default header mappings |
| 405 |
|
return $defaultHeaderMappings; |
| 406 |
|
} |
| 407 |
|
|
| 408 |
|
/** |
| 409 |
|
* Tries to format the passed value to a valid date with format 'Y-m-d H:i:s'. |