$settings) { if ($language === LANGUAGE_ID) { continue; } $url = Config::host() . rtrim((string)$settings["dir"], "/") . $relative; $nodes[] = ["@type" => $pageType, "@id" => $url . "#webpage", "url" => $url, "inLanguage" => $language]; } return $nodes; } public static function legalPage(string $path, string $name, string $description, string $modified): array { $url = Config::host() . $path; return [ "@context" => "https://schema.org", "@type" => "WebPage", "@id" => $url . "#webpage", "url" => $url, "name" => $name, "description" => $description, "inLanguage" => LANGUAGE_ID, "dateModified" => $modified, "workTranslation" => self::translations($path, "WebPage"), ]; } public static function aboutPage(string $path, string $name, string $description, array $image): array { $url = Config::host() . $path; return [ "@context" => "https://schema.org", "@type" => "AboutPage", "@id" => $url . "#webpage", "url" => $url, "name" => $name, "description" => $description, "inLanguage" => LANGUAGE_ID, "mainEntity" => ["@id" => Config::host() . "/#store"], "primaryImageOfPage" => $image, "workTranslation" => self::translations($path, "AboutPage"), ]; } public static function image(string $id, string $url, int $width, int $height): array { return [ "@type" => "ImageObject", "@id" => $id, "url" => $url, "contentUrl" => $url, "width" => ["@type" => "QuantitativeValue", "value" => $width, "unitCode" => "E37"], "height" => ["@type" => "QuantitativeValue", "value" => $height, "unitCode" => "E37"], ]; } }