Ok, so by now, you should be wondering how the controller class’s render() method knows where the “viewFile” view is. The answer is simple, Yii basically requires you to organize your code files in a structured set of folders. Specifically here’s what your Yii directory structure will look like:
That’s an oversimplification that those familiar with Yii may pin as incorrect, but again the point is to get the main high level concepts here, not master every precise specific. Learning it this way will make it 10 times easier to learn the specifics later. And yes, I’m going to keep repeating the technique of learning/teaching I propose throughout my FaceySpacey tutorials.
So basically the code you write in the AboutController.php class knows that when you want to render a view file named “viewFile” to render a file in the following file: /yoursite/views/viewFile.php.
They call this “convention over configuration,” which is basically a motto Yii attempts to adhere to in order to do things like keep the file structure similar from project to project--i.e. Yii projects all follow a similar file structure convention/style. In this case, this saves many lines of code where you have to define full file paths every time you want to reference another file of code.