src/Contao/View/Contao2BackendView/Widget/FileTree.php
private function applySorting($icons)
    {
        if (('' !== $this->orderField) && \is_array($this->orderFieldValue)) {
            $ordered = [];

            foreach ($this->orderFieldValue as $uuid) {
                $iconKey = \md5($uuid);
                if (isset($icons[$iconKey])) {
                    $ordered[$iconKey] = $icons[$iconKey];
                    unset($icons[$iconKey]);
                }
            }

            foreach ($icons as $uuid => $icon) {
                $ordered[\md5($uuid)] = $icon;
            }

            $icons = $ordered;
        }

        return $icons;
    }
private function applySorting($icons)
    {
        if (('' !== $this->orderField) && \is_array($this->orderFieldValue)) {
            $ordered = [];

            foreach ($this->orderFieldValue as $uuid) {
                $iconKey = \md5($uuid);
                if (isset($icons[$iconKey])) {
                    $ordered[$iconKey] = $icons[$iconKey];
                    unset($icons[$iconKey]);
                }
            }

            foreach ($icons as $uuid => $icon) {
                $ordered[\md5($uuid)] = $icon;
            }

            $icons = $ordered;
        }

        return $icons;
    }
private function applySorting ( $ icons ) { if ( ( '' !== $ this -> orderField ) && \ is_array ( $ this -> orderFieldValue ) ) { $ ordered = [ ] ; foreach ( $ this -> orderFieldValue as $ uuid ) { $ iconKey = \ md5 ( $ uuid ) ; if ( isset ( $ icons [ $ iconKey ] ) ) { $ ordered [ $ iconKey ] = $ icons [ $ iconKey ] ; unset ( $ icons [ $ iconKey ] ) ; } } foreach ( $ icons as $ uuid => $ icon ) { $ ordered [ \ md5 ( $ uuid ) ] = $ icon ; } $ icons = $ ordered ; } return $ icons ; }
Apply the sorting to the icons.

@param array $icons The file icons.

@return array
Apply the sorting to the icons .