private function PersianDateFormatter::isForMetaTag in Persian Date for Drupal 8 8.4
1 call to PersianDateFormatter::isForMetaTag()
- PersianDateFormatter::format in src/
Service/ Formatter/ PersianDateFormatter.php - Formats a date, using a date type or a custom date format string.
File
- src/
Service/ Formatter/ PersianDateFormatter.php, line 65
Class
Namespace
Drupal\persian_date\Service\FormatterCode
private function isForMetaTag() {
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;
}