| @@ 55-57 (lines=3) @@ | ||
| 52 | } |
|
| 53 | ||
| 54 | public function runSetup() { |
|
| 55 | if ($this->options['foreign_key'] == null) { |
|
| 56 | $this->options['foreign_key'] = Text::singularize($this->setupTable) . '_id'; |
|
| 57 | } |
|
| 58 | if ($this->options['local_key'] == null) { |
|
| 59 | $this->options['local_key'] = $this->setupPrimaryKey[0]; |
|
| 60 | } |
|
| @@ 91-94 (lines=4) @@ | ||
| 88 | $this->options['local_key'] = $this->setupPrimaryKey[0]; |
|
| 89 | } |
|
| 90 | ||
| 91 | if (!isset($this->options['junction_local_key'])) { |
|
| 92 | $this->options['junction_local_key'] = Text::singularize($this->setupTable) . '_id'; |
|
| 93 | } |
|
| 94 | ||
| 95 | if (!isset($this->options['junction_foreign_key'])) { |
|
| 96 | $this->options['junction_foreign_key'] = Text::singularize($foreignModel->getDBStoreInformation()['table']) . '_id'; |
|
| 97 | } |
|
| @@ 95-97 (lines=3) @@ | ||
| 92 | $this->options['junction_local_key'] = Text::singularize($this->setupTable) . '_id'; |
|
| 93 | } |
|
| 94 | ||
| 95 | if (!isset($this->options['junction_foreign_key'])) { |
|
| 96 | $this->options['junction_foreign_key'] = Text::singularize($foreignModel->getDBStoreInformation()['table']) . '_id'; |
|
| 97 | } |
|
| 98 | } |
|
| 99 | ||
| 100 | public function preSave(&$wrapper, $value) |
|