Ramesh Pareek
Ramesh Pareek

Reputation: 1669

Why is there an underscore before the Yii-2 framework's auto generated views (gii)?

I'm learning Yii2 and experimenting with Yii2's Gii. It automatically generates _form.php and _search.php. I'm trying to figure out Why does Gii adds an underscore before these files. Is this just a filenaming convention or is there any clear logic behind this?

Upvotes: 3

Views: 543

Answers (1)

Jonnny
Jonnny

Reputation: 5039

In Yii a file with an underscore is usually rendered as a partial file.

For instance _form.php is partially rendered from within the create or update files.

Upvotes: 4

Related Questions