| @@ 685-697 (lines=13) @@ | ||
| 682 | * |
|
| 683 | * @return bool |
|
| 684 | */ |
|
| 685 | public function hasRelationManyToOne() |
|
| 686 | { |
|
| 687 | $result = false; |
|
| 688 | ||
| 689 | $foreignField = $this->getForeignField(); |
|
| 690 | if (!empty($foreignField)) { |
|
| 691 | ||
| 692 | // Load TCA service of the foreign field. |
|
| 693 | $foreignTable = $this->getForeignTable(); |
|
| 694 | $result = $this->hasOne() && Tca::table($foreignTable)->field($foreignField)->hasMany(); |
|
| 695 | } |
|
| 696 | return $result; |
|
| 697 | } |
|
| 698 | ||
| 699 | /** |
|
| 700 | * Returns whether the field has one-to-many relation. |
|
| @@ 704-716 (lines=13) @@ | ||
| 701 | * |
|
| 702 | * @return bool |
|
| 703 | */ |
|
| 704 | public function hasRelationOneToMany() |
|
| 705 | { |
|
| 706 | $result = false; |
|
| 707 | ||
| 708 | $foreignField = $this->getForeignField(); |
|
| 709 | if (!empty($foreignField)) { |
|
| 710 | ||
| 711 | // Load TCA service of the foreign field. |
|
| 712 | $foreignTable = $this->getForeignTable(); |
|
| 713 | $result = $this->hasMany() && Tca::table($foreignTable)->field($foreignField)->hasOne(); |
|
| 714 | } |
|
| 715 | return $result; |
|
| 716 | } |
|
| 717 | ||
| 718 | /** |
|
| 719 | * Returns whether the field has one-to-one relation. |
|
| @@ 723-735 (lines=13) @@ | ||
| 720 | * |
|
| 721 | * @return bool |
|
| 722 | */ |
|
| 723 | public function hasRelationOneToOne() |
|
| 724 | { |
|
| 725 | $result = false; |
|
| 726 | ||
| 727 | $foreignField = $this->getForeignField(); |
|
| 728 | if (!empty($foreignField)) { |
|
| 729 | ||
| 730 | // Load TCA service of foreign field. |
|
| 731 | $foreignTable = $this->getForeignTable(); |
|
| 732 | $result = $this->hasOne() && Tca::table($foreignTable)->field($foreignField)->hasOne(); |
|
| 733 | } |
|
| 734 | return $result; |
|
| 735 | } |
|
| 736 | ||
| 737 | /** |
|
| 738 | * Returns whether the field has many to many relation. |
|