MetaModels\Helper\ToolboxFile::remapSorting PHP Method

remapSorting() protected method

All files from $arrFiles are being walked and the corresponding entry from source gets pulled in. Additionally, the css classes are applied to the returned 'source' array. This returns an array like: array('files' => array(), 'source' => array())
protected remapSorting ( array $arrFiles, array $arrSource ) : array
$arrFiles array The files to sort.
$arrSource array The source list.
return array The mapped result.
    protected function remapSorting($arrFiles, $arrSource)
    {
        $files = array();
        $source = array();
        foreach (array_keys($arrFiles) as $k) {
            $files[] = $arrFiles[$k];
            $source[] = $arrSource[$k];
        }
        $this->addClasses($source);
        return array('files' => $files, 'source' => $source);
    }