Example #1
0
 /**
  * Sort specified asset
  *
  * @return null
  */
 public function sort()
 {
     if ($this->request->has('sortOrder')) {
         $sortData = $this->request->input('sortOrder');
         $ids = array_keys($sortData);
         $orders = array_values($sortData);
         $file = new File();
         if ($file->exists) {
             $file->setSortableOrder($ids, $orders);
         }
         return;
     }
 }