original_string: protected function getOptions($trackId = null)
      {
          if (null === $trackId) {
              $trackId = $this->_trackId;
          }
  
          $appFields = $this->db->fetchPairs("
              SELECT gtap_id_app_field, gtap_field_name
                  FROM gems__track_appointments
                  WHERE gtap_id_track = ?
                  ORDER BY gtap_id_order", $trackId);
  
          $options = array();
  
          if ($appFields) {
              foreach ($appFields as $id => $label) {
                  $key = FieldsDefinition::makeKey(FieldMaintenanceModel::APPOINTMENTS_NAME, $id);
                  $options[$key] = $label;
              }
          }
  
          return $options;
  
      }
code: protected function getOptions($trackId = null)
      {
          if (null === $trackId) {
              $trackId = $this->_trackId;
          }
  
          $appFields = $this->db->fetchPairs("
              SELECT gtap_id_app_field, gtap_field_name
                  FROM gems__track_appointments
                  WHERE gtap_id_track = ?
                  ORDER BY gtap_id_order", $trackId);
  
          $options = array();
  
          if ($appFields) {
              foreach ($appFields as $id => $label) {
                  $key = FieldsDefinition::makeKey(FieldMaintenanceModel::APPOINTMENTS_NAME, $id);
                  $options[$key] = $label;
              }
          }
  
          return $options;
  
      }
code_tokens: protected function getOptions ( $ trackId = null ) { if ( null === $ trackId ) { $ trackId = $ this -> _trackId ; } $ appFields = $ this -> db -> fetchPairs ( "
              SELECT gtap_id_app_field, gtap_field_name
                  FROM gems__track_appointments
                  WHERE gtap_id_track = ?
                  ORDER BY gtap_id_order" , $ trackId ) ; $ options = array ( ) ; if ( $ appFields ) { foreach ( $ appFields as $ id => $ label ) { $ key = FieldsDefinition :: makeKey ( FieldMaintenanceModel :: APPOINTMENTS_NAME , $ id ) ; $ options [ $ key ] = $ label ; } } return $ options ; }
docstring: Get the calculate from options
  
  @param int $trackId
  @return array
docstring_tokens: Get the calculate from options