It’s apparently based on this passage in Doctrine and Covenants:
For we saw him, even on the right hand of God; and we heard the voice bearing record that he is the Only Begotten of the Father -
That by him, and through him, and of him, the worlds are and were created, and the inhabitants thereof are begotten sons and daughters unto God.
And this passage from the Book of Moses:
And it came to pass, as the voice was still speaking, Moses cast his eyes and beheld the earth, yea, even all of it; and there was not a particle of it which he did not behold, discerning it by the Spirit of God.
And he beheld also the inhabitants thereof, and there was not a soul which he beheld not; and he discerned them by the Spirit of God; and their numbers were great, even numberless as the sand upon the sea shore.
And he beheld many lands; and each land was called earth, and there were inhabitants on the face thereof.
And it came to pass that Moses called upon God, saying: Tell me, I pray thee, why these things are so, and by what thou madest them?
And behold, the glory of the Lord was upon Moses, so that Moses stood in the presence of God, and talked with him face to face. And the Lord God said unto Moses: For mine own purpose have I made these things. Here is wisdom and it remaineth in me.
And by the word of my power, have I created them, which is mine Only Begotten Son, who is full of grace and truth.
And worlds without number have I created; and I also created them for mine own purpose; and by the Son I created them, which is mine Only Begotten.
And the first man of all men have I called Adam, which is many.
But only an account of this earth, and the inhabitants thereof, give I unto you. For behold, there are many worlds that have passed away by the word of my power. And there are many that now stand, and innumerable are they unto man; but all things are numbered unto me, for they are mine and I know them.
And this passage in Abraham:
And I, Abraham, had the Urim and Thummim, which the Lord my God had given unto me, in Ur of the Chaldees;
And I saw the stars, that they were very great, and that one of them was nearest unto the throne of God; and there were many great ones which were near unto it;
And the Lord said unto me: These are the governing ones; and the name of the great one is Kolob, because it is near unto me, for I am the Lord thy God: I have set this one to govern all those which belong to the same order as that upon which thou standest.
That said, some branches of the church hold that only the Bible and the Book of Mormon are scripture and that the Doctrine and Covenants and the Pearl of Great Price, while important, are not scripture.