yii\gii\CodeFile::getRelativePath PHP Method

getRelativePath() public method

public getRelativePath ( ) : string
return string the code file path relative to the application base path.
    public function getRelativePath()
    {
        if (strpos($this->path, Yii::$app->basePath) === 0) {
            return substr($this->path, strlen(Yii::$app->basePath) + 1);
        } else {
            return $this->path;
        }
    }