public static function _groupAutoUpdateHelper(
        Api\GroupAutoUpdate $autoUpdate
    ) {
        $fields = [ 'to' => $autoUpdate->getRecipient() ];

        if (null != $autoUpdate->getAddFirstWord()) {
            $fields['add']['first_word'] = $autoUpdate->getAddFirstWord();
        }

        if (null != $autoUpdate->getAddSecondWord()) {
            $fields['add']['second_word'] = $autoUpdate->getAddSecondWord();
        }

        if (null != $autoUpdate->getRemoveFirstWord()) {
            $fields['remove']['first_word'] = $autoUpdate->getRemoveFirstWord();
        }

        if (null != $autoUpdate->getRemoveSecondWord()) {
            $fields['remove']['second_word'] = $autoUpdate->getRemoveSecondWord();
        }

        return $fields;
    }
public static function _groupAutoUpdateHelper(
        Api\GroupAutoUpdate $autoUpdate
    ) {
        $fields = [ 'to' => $autoUpdate->getRecipient() ];

        if (null != $autoUpdate->getAddFirstWord()) {
            $fields['add']['first_word'] = $autoUpdate->getAddFirstWord();
        }

        if (null != $autoUpdate->getAddSecondWord()) {
            $fields['add']['second_word'] = $autoUpdate->getAddSecondWord();
        }

        if (null != $autoUpdate->getRemoveFirstWord()) {
            $fields['remove']['first_word'] = $autoUpdate->getRemoveFirstWord();
        }

        if (null != $autoUpdate->getRemoveSecondWord()) {
            $fields['remove']['second_word'] = $autoUpdate->getRemoveSecondWord();
        }

        return $fields;
    }
public static function _groupAutoUpdateHelper ( Api \ GroupAutoUpdate $ autoUpdate ) { $ fields = [ 'to' => $ autoUpdate -> getRecipient ( ) ] ; if ( null != $ autoUpdate -> getAddFirstWord ( ) ) { $ fields [ 'add' ] [ 'first_word' ] = $ autoUpdate -> getAddFirstWord ( ) ; } if ( null != $ autoUpdate -> getAddSecondWord ( ) ) { $ fields [ 'add' ] [ 'second_word' ] = $ autoUpdate -> getAddSecondWord ( ) ; } if ( null != $ autoUpdate -> getRemoveFirstWord ( ) ) { $ fields [ 'remove' ] [ 'first_word' ] = $ autoUpdate -> getRemoveFirstWord ( ) ; } if ( null != $ autoUpdate -> getRemoveSecondWord ( ) ) { $ fields [ 'remove' ] [ 'second_word' ] = $ autoUpdate -> getRemoveSecondWord ( ) ; } return $ fields ; }
Helper that prepares the given group auto update for JSON
serialization.

@param Api\GroupAutoUpdate $autoUpdate the auto update to serialize

@return [] associative array suitable for JSON serialization
Helper that prepares the given group auto update for JSON serialization .