src/Helper/ToolboxFile.php
protected function sortByIdList($sortIds)
    {
        $fileMap = $this->foundFiles;
        if (!$fileMap) {
            return array('files' => array(), 'source' => array());
        }
        $fileKeys = array_flip(array_keys($this->uuidMap));
        $sorted   = array();
        foreach ($sortIds as $sortStringId) {
            $key          = $fileKeys[$sortStringId];
            $sorted[$key] = $fileMap[$key];
            unset($fileMap[$key]);
        }
        // Add anything not sorted yet to the end.
        $sorted += $fileMap;

        return $this->remapSorting($sorted, $this->outputBuffer);
    }
protected function sortByIdList($sortIds)
    {
        $fileMap = $this->foundFiles;
        if (!$fileMap) {
            return array('files' => array(), 'source' => array());
        }
        $fileKeys = array_flip(array_keys($this->uuidMap));
        $sorted   = array();
        foreach ($sortIds as $sortStringId) {
            $key          = $fileKeys[$sortStringId];
            $sorted[$key] = $fileMap[$key];
            unset($fileMap[$key]);
        }
        // Add anything not sorted yet to the end.
        $sorted += $fileMap;

        return $this->remapSorting($sorted, $this->outputBuffer);
    }
Sort by passed id list.

@param array $sortIds The list of binary ids to sort by.

@return array