protected function addContent()
    {
        try {
            $default = Content::defaultContent();
            $this->db->createCommand()->batchInsert(
                    Content::tableName(),
                    ['name', 'topic', 'content'],
                    [
                        [
                            Content::TERMS_AND_CONDS,
                            $default[Content::TERMS_AND_CONDS]['topic'],
                            $default[Content::TERMS_AND_CONDS]['content']
                        ],
                        [
                            Content::EMAIL_REGISTRATION,
                            $default[Content::EMAIL_REGISTRATION]['topic'],
                            $default[Content::EMAIL_REGISTRATION]['content']
                        ],
                        [
                            Content::EMAIL_PASSWORD,
                            $default[Content::EMAIL_PASSWORD]['topic'],
                            $default[Content::EMAIL_PASSWORD]['content']
                        ],
                        [
                            Content::EMAIL_REACTIVATION,
                            $default[Content::EMAIL_REACTIVATION]['topic'],
                            $default[Content::EMAIL_REACTIVATION]['content']
                        ],
                        [
                            Content::EMAIL_NEW,
                            $default[Content::EMAIL_NEW]['topic'],
                            $default[Content::EMAIL_NEW]['content']
                        ],
                        [
                            Content::EMAIL_SUBSCRIPTION,
                            $default[Content::EMAIL_SUBSCRIPTION]['topic'],
                            $default[Content::EMAIL_SUBSCRIPTION]['content']
                        ],
                    ]
                )->execute();
            return $this->returnSuccess(Yii::t('podium/flash', 'Default Content has been added.'));
        } catch (Exception $e) {
            return $this->returnError($e->getMessage(), __METHOD__,
                Yii::t('podium/flash', 'Error during content adding')
            );
        }
    }
protected function addContent()
    {
        try {
            $default = Content::defaultContent();
            $this->db->createCommand()->batchInsert(
                    Content::tableName(),
                    ['name', 'topic', 'content'],
                    [
                        [
                            Content::TERMS_AND_CONDS,
                            $default[Content::TERMS_AND_CONDS]['topic'],
                            $default[Content::TERMS_AND_CONDS]['content']
                        ],
                        [
                            Content::EMAIL_REGISTRATION,
                            $default[Content::EMAIL_REGISTRATION]['topic'],
                            $default[Content::EMAIL_REGISTRATION]['content']
                        ],
                        [
                            Content::EMAIL_PASSWORD,
                            $default[Content::EMAIL_PASSWORD]['topic'],
                            $default[Content::EMAIL_PASSWORD]['content']
                        ],
                        [
                            Content::EMAIL_REACTIVATION,
                            $default[Content::EMAIL_REACTIVATION]['topic'],
                            $default[Content::EMAIL_REACTIVATION]['content']
                        ],
                        [
                            Content::EMAIL_NEW,
                            $default[Content::EMAIL_NEW]['topic'],
                            $default[Content::EMAIL_NEW]['content']
                        ],
                        [
                            Content::EMAIL_SUBSCRIPTION,
                            $default[Content::EMAIL_SUBSCRIPTION]['topic'],
                            $default[Content::EMAIL_SUBSCRIPTION]['content']
                        ],
                    ]
                )->execute();
            return $this->returnSuccess(Yii::t('podium/flash', 'Default Content has been added.'));
        } catch (Exception $e) {
            return $this->returnError($e->getMessage(), __METHOD__,
                Yii::t('podium/flash', 'Error during content adding')
            );
        }
    }
protected function addContent ( ) { try { $ default = Content :: defaultContent ( ) ; $ this -> db -> createCommand ( ) -> batchInsert ( Content :: tableName ( ) , [ 'name' , 'topic' , 'content' ] , [ [ Content :: TERMS_AND_CONDS , $ default [ Content :: TERMS_AND_CONDS ] [ 'topic' ] , $ default [ Content :: TERMS_AND_CONDS ] [ 'content' ] ] , [ Content :: EMAIL_REGISTRATION , $ default [ Content :: EMAIL_REGISTRATION ] [ 'topic' ] , $ default [ Content :: EMAIL_REGISTRATION ] [ 'content' ] ] , [ Content :: EMAIL_PASSWORD , $ default [ Content :: EMAIL_PASSWORD ] [ 'topic' ] , $ default [ Content :: EMAIL_PASSWORD ] [ 'content' ] ] , [ Content :: EMAIL_REACTIVATION , $ default [ Content :: EMAIL_REACTIVATION ] [ 'topic' ] , $ default [ Content :: EMAIL_REACTIVATION ] [ 'content' ] ] , [ Content :: EMAIL_NEW , $ default [ Content :: EMAIL_NEW ] [ 'topic' ] , $ default [ Content :: EMAIL_NEW ] [ 'content' ] ] , [ Content :: EMAIL_SUBSCRIPTION , $ default [ Content :: EMAIL_SUBSCRIPTION ] [ 'topic' ] , $ default [ Content :: EMAIL_SUBSCRIPTION ] [ 'content' ] ] , ] ) -> execute ( ) ; return $ this -> returnSuccess ( Yii :: t ( 'podium/flash' , 'Default Content has been added.' ) ) ; } catch ( Exception $ e ) { return $ this -> returnError ( $ e -> getMessage ( ) , __METHOD__ , Yii :: t ( 'podium/flash' , 'Error during content adding' ) ) ; } }
Adds default content.
@return string result message.
Adds default content .