| @@ 157-171 (lines=15) @@ | ||
| 154 | * |
|
| 155 | * @return string |
|
| 156 | */ |
|
| 157 | public function getForeignClause() |
|
| 158 | { |
|
| 159 | $result = ''; |
|
| 160 | $configuration = $this->getConfiguration(); |
|
| 161 | ||
| 162 | if (!empty($configuration['foreign_table_where'])) { |
|
| 163 | $parts = explode('ORDER BY', $configuration['foreign_table_where']); |
|
| 164 | if (!empty($parts[0])) { |
|
| 165 | $result = $parts[0]; |
|
| 166 | } |
|
| 167 | } |
|
| 168 | ||
| 169 | // Substitute some variables |
|
| 170 | return $this->substituteKnownMarkers($result); |
|
| 171 | } |
|
| 172 | ||
| 173 | /** |
|
| 174 | * Substitute some known markers from the where clause in the Frontend Context. |
|
| @@ 204-216 (lines=13) @@ | ||
| 201 | * |
|
| 202 | * @return string |
|
| 203 | */ |
|
| 204 | public function getForeignOrder() |
|
| 205 | { |
|
| 206 | $result = ''; |
|
| 207 | $configuration = $this->getConfiguration(); |
|
| 208 | ||
| 209 | if (!empty($configuration['foreign_table_where'])) { |
|
| 210 | $parts = explode('ORDER BY', $configuration['foreign_table_where']); |
|
| 211 | if (!empty($parts[1])) { |
|
| 212 | $result = $parts[1]; |
|
| 213 | } |
|
| 214 | } |
|
| 215 | return $result; |
|
| 216 | } |
|
| 217 | ||
| 218 | /** |
|
| 219 | * Returns the MM table of a field. |
|