NerdsAndCompany\Schematic\Models\Field::getMappedSources PHP Метод

getMappedSources() приватный Метод

Get sources based on the indexFrom attribute and return them with the indexTo attribute.
private getMappedSources ( string $fieldType, string | array $sources, string $indexFrom, string $indexTo ) : array | string
$fieldType string
$sources string | array
$indexFrom string
$indexTo string
Результат array | string
    private function getMappedSources($fieldType, $sources, $indexFrom, $indexTo)
    {
        $mappedSources = $sources;
        if (is_array($sources)) {
            $mappedSources = [];
            foreach ($sources as $source) {
                $mappedSources[] = $this->getSource($fieldType, $source, $indexFrom, $indexTo);
            }
        }
        return $mappedSources;
    }