public static function injectModel(&$model) {
        $actionResult = self::$viewContext->actionResult;

        if (!empty($actionResult)) {
            if ($actionResult instanceof ViewResult && !empty($actionResult->model)) {
                $model = $actionResult->model;
            }
            else {
                $model = null;
            }
        }
    }
public static function injectModel(&$model) {
        $actionResult = self::$viewContext->actionResult;

        if (!empty($actionResult)) {
            if ($actionResult instanceof ViewResult && !empty($actionResult->model)) {
                $model = $actionResult->model;
            }
            else {
                $model = null;
            }
        }
    }
public static function injectModel ( & $ model ) { $ actionResult = self :: $ viewContext -> actionResult ; if ( ! empty ( $ actionResult ) ) { if ( $ actionResult instanceof ViewResult && ! empty ( $ actionResult -> model ) ) { $ model = $ actionResult -> model ; } else { $ model = null ; } } }
Injects model to state.

@param mixed &$model Model to injection.

@return void
Injects model to state .