| @@ 137-149 (lines=13) @@ | ||
| 134 | * |
|
| 135 | * @return string|null |
|
| 136 | */ |
|
| 137 | public function getForeignTable() |
|
| 138 | { |
|
| 139 | $result = null; |
|
| 140 | $configuration = $this->getConfiguration(); |
|
| 141 | ||
| 142 | if (!empty($configuration['foreign_table'])) { |
|
| 143 | $result = $configuration['foreign_table']; |
|
| 144 | } elseif ($this->isGroup()) { |
|
| 145 | $fieldParts = explode('.', $this->compositeField, 2); |
|
| 146 | $result = $fieldParts[1]; |
|
| 147 | } |
|
| 148 | return $result; |
|
| 149 | } |
|
| 150 | ||
| 151 | /** |
|
| 152 | * Returns the foreign clause. |
|
| @@ 236-251 (lines=16) @@ | ||
| 233 | * |
|
| 234 | * @return string|null |
|
| 235 | */ |
|
| 236 | public function getAdditionalTableNameCondition() |
|
| 237 | { |
|
| 238 | $result = null; |
|
| 239 | $configuration = $this->getConfiguration(); |
|
| 240 | ||
| 241 | if (!empty($configuration['MM_match_fields']['tablenames'])) { |
|
| 242 | $result = $configuration['MM_match_fields']['tablenames']; |
|
| 243 | } elseif ($this->isGroup()) { |
|
| 244 | ||
| 245 | // @todo check if $this->fieldName could be simply used as $result |
|
| 246 | $fieldParts = explode('.', $this->compositeField, 2); |
|
| 247 | $result = $fieldParts[1]; |
|
| 248 | } |
|
| 249 | ||
| 250 | return $result; |
|
| 251 | } |
|
| 252 | ||
| 253 | /** |
|
| 254 | * Returns a possible additional conditions for MM tables such as "tablenames", "fieldname", etc... |
|