@@ -93,15 +93,15 @@ In the above code, four components are configured: `cache`, `user`, `errorHandle
The configuration array has one special key named `class` that identifies the component's base class. The rest of the keys and values are used
to configure component properties in the same way as top-level keys are used to configure the application's properties.
Each application has a predefined set of components. To configure one of these, the `class` key can be omitted to use the default Yii class for that component. You can check the `registerCoreComponents()` method of the application you are using
Each application has a predefined set of components. To configure one of these, the `class` key can be omitted to use the default Yii class for that component. You can check the `coreComponents()` method of the application you are using
to get a list of component IDs and corresponding classes.
Note that Yii is smart enough to only configure the component when it's actually being used: for example, if you configure the `cache` component in your configuration file but never use the `cache` component in your code, no instance of that component will be created and no time is wasted configuring it.
Setting component defaults classwide
Setting component defaults class-wide
------------------------------------
For each component you can specifiy classwide defaults. For example, if you want to change the class used for all `LinkPager`
For each component you can specify class-wide defaults. For example, if you want to change the class used for all `LinkPager`
widgets without specifying the class for every widget usage, you can do the following:
```php
...
...
@@ -115,4 +115,4 @@ widgets without specifying the class for every widget usage, you can do the foll
```
The code above should be executed once before `LinkPager` widget is used. It can be done in `index.php`, the application