CustomMsgSwitchMultyTransformer.php 1.3 KB

1234567891011121314151617181920
  1. <?php
  2. namespace App\Http\Controllers\Channel\OfficialAccount\Transformers;
  3. class CustomMsgSwitchMultyTransformer
  4. {
  5. public function transform($customMsgSwitchMsgs){
  6. return [
  7. 'title' => isset($customMsgSwitchMsgs['title']) ? $customMsgSwitchMsgs['title'] : "",
  8. 'custom_category' => isset($customMsgSwitchMsgs['custom_category']) ? $customMsgSwitchMsgs['custom_category'] : "",
  9. 'status' => isset($customMsgSwitchMsgs['status']) ? $customMsgSwitchMsgs['status'] : "",
  10. 'distribution_channel_id' => isset($customMsgSwitchMsgs['distribution_channel_id']) ? $customMsgSwitchMsgs['distribution_channel_id'] : "",
  11. 'id' => isset($customMsgSwitchMsgs['id']) ? $customMsgSwitchMsgs['id'] : "",
  12. 'desc_content' => isset($customMsgSwitchMsgs['desc_content']) ? $customMsgSwitchMsgs['desc_content'] : "",
  13. 'img_url' => isset($customMsgSwitchMsgs['img_url']) ? $customMsgSwitchMsgs['img_url'] : "",
  14. 'common_is_self_content' => isset($customMsgSwitchMsgs['common_is_self_content']) ? $customMsgSwitchMsgs['common_is_self_content'] : "0",
  15. 'is_self_content' => isset($customMsgSwitchMsgs['is_self_content']) ? $customMsgSwitchMsgs['is_self_content'] : "0",
  16. ];
  17. }
  18. }