Rename variable
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
This commit is contained in:
parent
a38dc99c5b
commit
a59de24826
@ -381,7 +381,7 @@ final class ReplaceController implements InvocableController
|
||||
{
|
||||
$relFieldsList = $request->getParsedBodyParam('rel_fields_list', '');
|
||||
if ($relFieldsList !== '') {
|
||||
$map = $this->relation->getForeigners(Current::$database, Current::$table);
|
||||
$foreigners = $this->relation->getForeigners(Current::$database, Current::$table);
|
||||
|
||||
/** @var array<int,array> $relationFields */
|
||||
$relationFields = [];
|
||||
@ -393,12 +393,12 @@ final class ReplaceController implements InvocableController
|
||||
$whereComparison = "='" . $relationFieldValue . "'";
|
||||
$dispval = $this->insertEdit->getDisplayValueForForeignTableColumn(
|
||||
$whereComparison,
|
||||
$map,
|
||||
$foreigners,
|
||||
$relationField,
|
||||
);
|
||||
|
||||
$extraData['relations'][$cellIndex] = $this->insertEdit->getLinkForRelationalDisplayField(
|
||||
$map,
|
||||
$foreigners,
|
||||
$relationField,
|
||||
$whereComparison,
|
||||
$dispval,
|
||||
|
||||
@ -976,18 +976,18 @@ class InsertEdit
|
||||
* Column to display from the foreign table?
|
||||
*
|
||||
* @param string $whereComparison string that contain relation field value
|
||||
* @param mixed[] $map all Relations to foreign tables for a given
|
||||
* table or optionally a given column in a table
|
||||
* @param mixed[] $foreigners all Relations to foreign tables for a given
|
||||
* table or optionally a given column in a table
|
||||
* @param string $relationField relation field
|
||||
*
|
||||
* @return string display value from the foreign table
|
||||
*/
|
||||
public function getDisplayValueForForeignTableColumn(
|
||||
string $whereComparison,
|
||||
array $map,
|
||||
array $foreigners,
|
||||
string $relationField,
|
||||
): string {
|
||||
$foreigner = $this->relation->searchColumnInForeigners($map, $relationField);
|
||||
$foreigner = $this->relation->searchColumnInForeigners($foreigners, $relationField);
|
||||
|
||||
if (! is_array($foreigner)) {
|
||||
return '';
|
||||
@ -1013,8 +1013,8 @@ class InsertEdit
|
||||
/**
|
||||
* Display option in the cell according to user choices
|
||||
*
|
||||
* @param mixed[] $map all Relations to foreign tables for a given
|
||||
* table or optionally a given column in a table
|
||||
* @param mixed[] $foreigners all Relations to foreign tables for a given
|
||||
* table or optionally a given column in a table
|
||||
* @param string $relationField relation field
|
||||
* @param string $whereComparison string that contain relation field value
|
||||
* @param string $dispval display value from the foreign table
|
||||
@ -1023,13 +1023,13 @@ class InsertEdit
|
||||
* @return string HTML <a> tag
|
||||
*/
|
||||
public function getLinkForRelationalDisplayField(
|
||||
array $map,
|
||||
array $foreigners,
|
||||
string $relationField,
|
||||
string $whereComparison,
|
||||
string $dispval,
|
||||
string $relationFieldValue,
|
||||
): string {
|
||||
$foreigner = $this->relation->searchColumnInForeigners($map, $relationField);
|
||||
$foreigner = $this->relation->searchColumnInForeigners($foreigners, $relationField);
|
||||
|
||||
if (! is_array($foreigner)) {
|
||||
return '';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user