/**
  * Stores the fields that can be used for sorting or filtering in the
  * sort / filter objects attached to this model.
  *
  * @param array $parameters
  * @param boolean $includeNumericFilters When true numeric filter keys (0, 1, 2...) are added to the filter as well
  * @return array The $parameters minus the sort & textsearch keys
  */
 public function applyParameters(array $parameters, $includeNumericFilters = false)
 {
     if ($parameters) {
         // Allow use when passed only an ID value
         if (isset($parameters[\MUtil_Model::REQUEST_ID]) && !isset($parameters[\MUtil_Model::REQUEST_ID1], $parameters[\MUtil_Model::REQUEST_ID2])) {
             $id = $parameters[\MUtil_Model::REQUEST_ID];
             $keys = $this->getKeys();
             $field = array_shift($keys);
             $parameters[$field] = $id;
             if ($field2 = array_shift($keys)) {
                 $parameters[$field2] = $this->getCurrentOrganization();
                 \MUtil_Echo::r('Still using old HiddenModel parameters.', 'DEPRECIATION WARNING');
                 \MUtil_Echo::r($parameters);
             }
             unset($parameters[\MUtil_Model::REQUEST_ID]);
         }
         if (isset($parameters[\MUtil_Model::REQUEST_ID2]) && !array_key_exists($parameters[\MUtil_Model::REQUEST_ID2], $this->currentUser->getAllowedOrganizations())) {
             $this->initTranslateable();
             throw new \Gems_Exception($this->_('Inaccessible or unknown organization'), 403, null, sprintf($this->_('Access to this page is not allowed for current role: %s.'), $this->currentUser->getRole()));
         }
         return parent::applyParameters($parameters, $includeNumericFilters);
     }
     return array();
 }