code: public function createForeignDataItem($model, $config = [])
      {
          $config['isForeign'] = true;
          $config['foreignObject'] = $model;
          if (isset($model)) {
              $model->interface = $this->module;
          }
          $object = $this->createDataItem($config);
  
          return $this->_foreignDataItems[$object->id] = $object;
      }
docs: [[@doctodo method_description:createForeignDataItem]].
  
  @param [[@doctodo param_type:model]] $model  [[@doctodo param_description:model]]
  @param array                         $config [[@doctodo param_description:config]] [optional]
  
  @return [[@doctodo return_type:createForeignDataItem]] [[@doctodo return_description:createForeignDataItem]]