You are here

public function FullCalendar::filterEmptyValue in FullCalendar 8.4

Same name and namespace in other branches
  1. 8.5 src/Plugin/fullcalendar/type/FullCalendar.php \Drupal\fullcalendar\Plugin\fullcalendar\type\FullCalendar::filterEmptyValue()
  2. 8.2 src/Plugin/fullcalendar/type/FullCalendar.php \Drupal\fullcalendar\Plugin\fullcalendar\type\FullCalendar::filterEmptyValue()

Helper function to check for empty values.

Parameters

array $array:

mixed $value:

string $depth1:

string $depth2:

File

src/Plugin/fullcalendar/type/FullCalendar.php, line 1144

Class

FullCalendar
Plugin annotation @FullcalendarOption( id = "fullcalendar", module = "fullcalendar", js = TRUE, weight = "-20" )

Namespace

Drupal\fullcalendar\Plugin\fullcalendar\type

Code

public function filterEmptyValue(&$array, $value, $depth1, $depth2 = '') {
  if (!is_bool($value)) {
    if (!strlen($value)) {
      return;
    }
  }
  if (!strlen($depth2)) {
    $array[$depth1] = $value;
  }
  else {
    $array[$depth1][$depth2] = $value;
  }
}