private function getCampaignPrizes($campaignId) {
    /** @var \Drupal\node\Entity\Node $campaign Campaign node. */
    $campaign = $this->entityTypeManager->getStorage('node')->load($campaignId);

    $prizes = [];
    foreach ($campaign->field_campaign_winners_prizes as $item) {
      /** @var \Drupal\paragraphs\Entity\Paragraph $paragraph */
      $paragraph = $item->entity;
      $place = $paragraph->field_prgf_place->value;
      if (!empty($place)) {
        $prizes[$place] = [
          'place' => $place,
          'title' => $paragraph->field_prgf_prize_title->value,
          'text' => check_markup($paragraph->field_prgf_prize_text->value, $paragraph->field_prgf_prize_text->format),
        ];
      }
    }

    return $prizes;
  }
private function getCampaignPrizes($campaignId) {
    /** @var \Drupal\node\Entity\Node $campaign Campaign node. */
    $campaign = $this->entityTypeManager->getStorage('node')->load($campaignId);

    $prizes = [];
    foreach ($campaign->field_campaign_winners_prizes as $item) {
      /** @var \Drupal\paragraphs\Entity\Paragraph $paragraph */
      $paragraph = $item->entity;
      $place = $paragraph->field_prgf_place->value;
      if (!empty($place)) {
        $prizes[$place] = [
          'place' => $place,
          'title' => $paragraph->field_prgf_prize_title->value,
          'text' => check_markup($paragraph->field_prgf_prize_text->value, $paragraph->field_prgf_prize_text->format),
        ];
      }
    }

    return $prizes;
  }
private function getCampaignPrizes ( $ campaignId ) { /** @var \Drupal\node\Entity\Node $campaign Campaign node. */ $ campaign = $ this -> entityTypeManager -> getStorage ( 'node' ) -> load ( $ campaignId ) ; $ prizes = [ ] ; foreach ( $ campaign -> field_campaign_winners_prizes as $ item ) { /** @var \Drupal\paragraphs\Entity\Paragraph $paragraph */ $ paragraph = $ item -> entity ; $ place = $ paragraph -> field_prgf_place -> value ; if ( ! empty ( $ place ) ) { $ prizes [ $ place ] = [ 'place' => $ place , 'title' => $ paragraph -> field_prgf_prize_title -> value , 'text' => check_markup ( $ paragraph -> field_prgf_prize_text -> value , $ paragraph -> field_prgf_prize_text -> format ) , ] ; } } return $ prizes ; }
Get all prizes of current Campaign.

@param $campaignId

@return array
Get all prizes of current Campaign .