src/ActiveRecord.php
public function getScenarioAction($default = '')
    {
        if ($this->isScenarioDefault()) {
            if (empty($default)) {
                throw new InvalidConfigException('Scenario not specified');
            }

            return $default;
        } else {
            $actions = static::scenarioActions();

            return isset($actions[$this->scenario]) ? $actions[$this->scenario] : $this->scenario;
        }
    }
public function getScenarioAction($default = '')
    {
        if ($this->isScenarioDefault()) {
            if (empty($default)) {
                throw new InvalidConfigException('Scenario not specified');
            }

            return $default;
        } else {
            $actions = static::scenarioActions();

            return isset($actions[$this->scenario]) ? $actions[$this->scenario] : $this->scenario;
        }
    }
public function getScenarioAction ( $ default = '' ) { if ( $ this -> isScenarioDefault ( ) ) { if ( empty ( $ default ) ) { throw new InvalidConfigException ( 'Scenario not specified' ) ; } return $ default ; } else { $ actions = static :: scenarioActions ( ) ; return isset ( $ actions [ $ this -> scenario ] ) ? $ actions [ $ this -> scenario ] : $ this -> scenario ; } }
Converts scenario name to action.
@param string $default default action name
@throws InvalidConfigException
@throws NotSupportedException
@return string
Converts scenario name to action .