yii\test\ArrayFixture::getData PHP Method

getData() protected method

The default implementation will try to return the fixture data by including the external file specified by [[dataFile]]. The file should return the data array that will be stored in [[data]] after inserting into the database.
protected getData ( ) : array
return array the data to be put into the database
    protected function getData()
    {
        if ($this->dataFile === false || $this->dataFile === null) {
            return [];
        }
        $dataFile = Yii::getAlias($this->dataFile);
        if (is_file($dataFile)) {
            return require $dataFile;
        } else {
            throw new InvalidConfigException("Fixture data file does not exist: {$this->dataFile}");
        }
    }