public function scenarios()
    {
        $scenarios = [self::SCENARIO_DEFAULT => []];
        $this->fillScenariosKeys($scenarios);

        $this->fillScenariosAttributes($scenarios);

        foreach ($scenarios as $scenario => $attributes) {
            if (!empty($attributes)) {
                $scenarios[$scenario] = array_keys($attributes);
            }
        }

        return $scenarios;
    }
public function scenarios()
    {
        $scenarios = [self::SCENARIO_DEFAULT => []];
        $this->fillScenariosKeys($scenarios);

        $this->fillScenariosAttributes($scenarios);

        foreach ($scenarios as $scenario => $attributes) {
            if (!empty($attributes)) {
                $scenarios[$scenario] = array_keys($attributes);
            }
        }

        return $scenarios;
    }
public function scenarios ( ) { $ scenarios = [ self :: SCENARIO_DEFAULT => [ ] ] ; $ this -> fillScenariosKeys ( $ scenarios ) ; $ this -> fillScenariosAttributes ( $ scenarios ) ; foreach ( $ scenarios as $ scenario => $ attributes ) { if ( ! empty ( $ attributes ) ) { $ scenarios [ $ scenario ] = array_keys ( $ attributes ) ; } } return $ scenarios ; }
Returns a list of scenarios and the corresponding active attributes.

An active attribute is one that is subject to validation in the current scenario.
The returned array should be in the following format:

```php
[
'scenario1' => ['attribute11', 'attribute12', ...],
'scenario2' => ['attribute21', 'attribute22', ...],
...
]
```

By default, an active attribute is considered safe and can be massively assigned.
If an attribute should NOT be massively assigned (thus considered unsafe),
please prefix the attribute with an exclamation character (e.g. `'!rank'`).

The default implementation of this method will return all scenarios found in the [[rules()]]
declaration. A special scenario named [[SCENARIO_DEFAULT]] will contain all attributes
found in the [[rules()]]. Each scenario will be associated with the attributes that
are being validated by the validation rules that apply to the scenario.

@return array a list of scenarios and the corresponding active attributes.
Returns a list of scenarios and the corresponding active attributes .