public function buildAlerts($parameters) {
    $build = '';
    if (!$parameters['location'] || $parameters['location'] == 'All') {
      return $build;
    }

    $locationOptions = $this->getLocationOptions();
    if (!empty($locationOptions['branches'][$parameters['location']])) {
      $id = $parameters['location'];
    }
    if (!empty($locationOptions['camps'][$parameters['location']])) {
      $id = $parameters['location'];
    }
    if (!isset($id)) {
      return $build;
    }
    $build = [
      '#theme' => 'openy_schedules_alerts_block',
      '#alerts' => views_embed_view('header_alerts', 'specific_alerts_block', $id),
    ];

    return $build;
  }
public function buildAlerts($parameters) {
    $build = '';
    if (!$parameters['location'] || $parameters['location'] == 'All') {
      return $build;
    }

    $locationOptions = $this->getLocationOptions();
    if (!empty($locationOptions['branches'][$parameters['location']])) {
      $id = $parameters['location'];
    }
    if (!empty($locationOptions['camps'][$parameters['location']])) {
      $id = $parameters['location'];
    }
    if (!isset($id)) {
      return $build;
    }
    $build = [
      '#theme' => 'openy_schedules_alerts_block',
      '#alerts' => views_embed_view('header_alerts', 'specific_alerts_block', $id),
    ];

    return $build;
  }
public function buildAlerts ( $ parameters ) { $ build = '' ; if ( ! $ parameters [ 'location' ] || $ parameters [ 'location' ] == 'All' ) { return $ build ; } $ locationOptions = $ this -> getLocationOptions ( ) ; if ( ! empty ( $ locationOptions [ 'branches' ] [ $ parameters [ 'location' ] ] ) ) { $ id = $ parameters [ 'location' ] ; } if ( ! empty ( $ locationOptions [ 'camps' ] [ $ parameters [ 'location' ] ] ) ) { $ id = $ parameters [ 'location' ] ; } if ( ! isset ( $ id ) ) { return $ build ; } $ build = [ '#theme' => 'openy_schedules_alerts_block' , '#alerts' => views_embed_view ( 'header_alerts' , 'specific_alerts_block' , $ id ) , ] ; return $ build ; }
Build Alerts.
Build Alerts .