/**
  * Sorts the Result Array according to the Flexform Settings
  *
  * @param array $imageItems The image items
  *
  * @return array
  */
 protected function sortFileObjects($imageItems)
 {
     $lowercase = array_map(function ($n) {
         return strtolower($n->getName());
     }, $imageItems);
     if ($this->frontendConfigurationManager->getConfiguration()['settings']['order'] === 'desc') {
         array_multisort($lowercase, SORT_DESC, SORT_STRING, $imageItems);
     } else {
         array_multisort($lowercase, SORT_ASC, SORT_STRING, $imageItems);
     }
     return $imageItems;
 }