Yii v2 snippet guide

Comparing #142 with #143

Revision #143 was created by rackycz rackycz on Oct 6, 2019, 8:04:56 PM.

scenario

Content

[...]
],
],
],
```

You can customize the calendar in many ways. For example different event-color is shown [here](https://fullcalendar.io/docs/event-colors-demo). Check the source code.

 
 
**Scenarios - UNKNOWN SCENARIO EXCEPTION**
 
---
 
I have been using scenarios a lot but today I spent 1 hour on a problem - I had 2 scenarios and one of them was just assigned to the model ...
 
```php
 
$model->scenario = "abc";
 
```
 
... but had no **rule** defined yet. I wanted to implement the rule later, but I didnt know that when you set a scenario to your model it **must** be used in method rules() or defined in method scenarios(). So take this into consideration. I expected that when the scenario has no rules it will just be skipped or deleted.