You are here

static function Helpers::shouldIgnoreCalendarSystemsDateConversion in Calendar Systems 8.2

1 call to Helpers::shouldIgnoreCalendarSystemsDateConversion()
CalendarSystemsDateFormatter::format in src/Services/DateFormatter/CalendarSystemsDateFormatter.php
Formats a date, using a date type or a custom date format string.

File

src/Helpers.php, line 267
Contains \Drupal\calendar_systems.

Class

Helpers

Namespace

Drupal\calendar_systems

Code

static function shouldIgnoreCalendarSystemsDateConversion() {
  foreach (debug_backtrace() as $trace) {
    if (!isset($trace['file'])) {
      continue;
    }
    $isMetatagModuleCalling = strpos($trace['file'], '/metatag/') !== FALSE;
    $isRdfModuleCalling = strpos($trace['file'], '/rdf/') !== FALSE;
    if ($isMetatagModuleCalling || $isRdfModuleCalling) {
      return TRUE;
    }
  }
  return FALSE;
}