original_string: public function actionIndex(): int
      {
          $this->disableLogging();
  
          $configurations = [];
          foreach ($this->getDataTypes() as $dataTypeHandle) {
              $dataType = $this->module->getDataType($dataTypeHandle);
              if (null == $dataType) {
                  continue;
              }
  
              $mapper = $dataType->getMapperHandle();
              if (!$this->module->checkMapper($mapper)) {
                  continue;
              }
  
              $records = $dataType->getRecords();
              $configurations[$dataTypeHandle] = $this->module->$mapper->export($records);
          }
  
          // Load override file.
          $overrideData = [];
          if (file_exists($this->overrideFile)) {
              // Parse data in the overrideFile if available.
              $overrideData = Data::parseYamlFile($this->overrideFile);
          }
  
          // Export the configuration to a single file.
          if ($this->getStorageType() === self::SINGLE_FILE) {
              $this->exportToSingle($configurations, $overrideData);
          }
  
          // Export the configuration to multiple yaml files.
          if ($this->getStorageType() === self::MULTIPLE_FILES) {
              $this->exportToMultiple($configurations, $overrideData);
          }
  
          return 0;
      }
code: public function actionIndex(): int
      {
          $this->disableLogging();
  
          $configurations = [];
          foreach ($this->getDataTypes() as $dataTypeHandle) {
              $dataType = $this->module->getDataType($dataTypeHandle);
              if (null == $dataType) {
                  continue;
              }
  
              $mapper = $dataType->getMapperHandle();
              if (!$this->module->checkMapper($mapper)) {
                  continue;
              }
  
              $records = $dataType->getRecords();
              $configurations[$dataTypeHandle] = $this->module->$mapper->export($records);
          }
  
          // Load override file.
          $overrideData = [];
          if (file_exists($this->overrideFile)) {
              // Parse data in the overrideFile if available.
              $overrideData = Data::parseYamlFile($this->overrideFile);
          }
  
          // Export the configuration to a single file.
          if ($this->getStorageType() === self::SINGLE_FILE) {
              $this->exportToSingle($configurations, $overrideData);
          }
  
          // Export the configuration to multiple yaml files.
          if ($this->getStorageType() === self::MULTIPLE_FILES) {
              $this->exportToMultiple($configurations, $overrideData);
          }
  
          return 0;
      }
code_tokens: public function actionIndex ( ) : int { $ this -> disableLogging ( ) ; $ configurations = [ ] ; foreach ( $ this -> getDataTypes ( ) as $ dataTypeHandle ) { $ dataType = $ this -> module -> getDataType ( $ dataTypeHandle ) ; if ( null == $ dataType ) { continue ; } $ mapper = $ dataType -> getMapperHandle ( ) ; if ( ! $ this -> module -> checkMapper ( $ mapper ) ) { continue ; } $ records = $ dataType -> getRecords ( ) ; $ configurations [ $ dataTypeHandle ] = $ this -> module -> $ mapper -> export ( $ records ) ; } // Load override file. $ overrideData = [ ] ; if ( file_exists ( $ this -> overrideFile ) ) { // Parse data in the overrideFile if available. $ overrideData = Data :: parseYamlFile ( $ this -> overrideFile ) ; } // Export the configuration to a single file. if ( $ this -> getStorageType ( ) === self :: SINGLE_FILE ) { $ this -> exportToSingle ( $ configurations , $ overrideData ) ; } // Export the configuration to multiple yaml files. if ( $ this -> getStorageType ( ) === self :: MULTIPLE_FILES ) { $ this -> exportToMultiple ( $ configurations , $ overrideData ) ; } return 0 ; }
docstring: Exports the Craft datamodel.
  
  @return int
  @throws \yii\base\ErrorException
docstring_tokens: Exports the Craft datamodel .