protected function initContainer($module)
    {
        $map = [];

        $defaultClassMap = [
            /* FORMS */
            'AddPermissionForm' => AddPermissionForm::class,
            'AssignRoleForm' => AssignRoleForm::class,
            'LoginForm' => LoginForm::class,
            'RequestPasswordResetForm' => RequestPasswordResetForm::class,
            'ResetPasswordForm' => ResetPasswordForm::class,

            /* MODELS */
            'AuthAssignment' => AuthAssignment::class,
            'AuthItem' => AuthItem::class,
            'AuthItemChild' => AuthItemChild::class,
            'AuthRule' => AuthRule::class,
            'Message' => Message::class,
            'SourceMessage' => SourceMessage::class,
            'User' => User::class,

            /* QUERIES */
            'MessageQuery' => MessageQuery::class,
            'SourceMessageQuery' => SourceMessageQuery::class,
            'UserQuery' => UserQuery::class,

            /* SEARCH */
            'SourceMessageSearch' => SourceMessageSearch::class,
            'UserSearch' => UserSearch::class,
        ];

        $routes = [
            'mrstroz\\wavecms\\forms' => [
                'AddPermissionForm',
                'AssignRoleForm',
                'LoginForm',
                'RequestPasswordResetForm',
                'ResetPasswordForm',
            ],
            'mrstroz\\wavecms\\models' => [
                'AuthAssignment',
                'AuthItem',
                'AuthItemChild',
                'AuthRule',
                'Message',
                'SourceMessage',
                'User',
            ],
            'mrstroz\\wavecms\\models\\query' => [
                'MessageQuery',
                'SourceMessageQuery',
                'UserQuery',
            ],
            'mrstroz\\wavecms\\models\\search' => [
                'SourceMessageSearch',
                'UserSearch',
            ]
        ];

        $mapping = array_merge($defaultClassMap, $module->classMap);

        foreach ($mapping as $name => $definition) {
            $map[$this->getContainerRoute($routes, $name) . "\\$name"] = $definition;
        }

        $di = Yii::$container;

        foreach ($map as $class => $definition) {
            /** Check if definition does not exist in container. */
            if (!$di->has($class)) {
                $di->set($class, $definition);
            }
        }

    }