src/Relations/HasOneOrMany.php 1 location
|
@@ 95-101 (lines=7) @@
|
| 92 |
|
* @param RecordCollection $collection |
| 93 |
|
* @return array |
| 94 |
|
*/ |
| 95 |
|
public function getEagerFkList(RecordCollection $collection) |
| 96 |
|
{ |
| 97 |
|
$key = $collection->getManager()->getPrimaryKey(); |
| 98 |
|
$return = HelperBroker::get('Arrays')->pluck($collection, $key); |
| 99 |
|
|
| 100 |
|
return array_unique($return); |
| 101 |
|
} |
| 102 |
|
|
| 103 |
|
/** |
| 104 |
|
* @param array $dictionary |
src/Relations/Relation.php 1 location
|
@@ 449-456 (lines=8) @@
|
| 446 |
|
* @param RecordCollection $collection |
| 447 |
|
* @return array |
| 448 |
|
*/ |
| 449 |
|
public function getEagerFkList(RecordCollection $collection) |
| 450 |
|
{ |
| 451 |
|
/** @var ArraysHelper $arrayHelper */ |
| 452 |
|
$arrayHelper = HelperBroker::get('Arrays'); |
| 453 |
|
$return = $arrayHelper->pluck($collection, $this->getFK()); |
| 454 |
|
|
| 455 |
|
return array_unique($return); |
| 456 |
|
} |
| 457 |
|
|
| 458 |
|
/** |
| 459 |
|
* @return string |