original_string: public function onSortAttachments()
      {
          if ($sortData = post('sortOrder')) {
              $ids = array_keys($sortData);
              $orders = array_values($sortData);
  
              $fileModel = $this->getRelationModel();
              $fileModel->setSortableOrder($ids, $orders);
          }
      }
code: public function onSortAttachments()
      {
          if ($sortData = post('sortOrder')) {
              $ids = array_keys($sortData);
              $orders = array_values($sortData);
  
              $fileModel = $this->getRelationModel();
              $fileModel->setSortableOrder($ids, $orders);
          }
      }
code_tokens: public function onSortAttachments ( ) { if ( $ sortData = post ( 'sortOrder' ) ) { $ ids = array_keys ( $ sortData ) ; $ orders = array_values ( $ sortData ) ; $ fileModel = $ this -> getRelationModel ( ) ; $ fileModel -> setSortableOrder ( $ ids , $ orders ) ; } }
docstring: Sorts file attachments.
docstring_tokens: Sorts file attachments .