Craft\Seomatic_MetaFieldModel::getJsonLD PHP Method

getJsonLD() public method

Returns the Main Entity of Page JSON-LD for the entry, without mainEntryOfPage being set
public getJsonLD ( $element ) : string
return string
    public function getJsonLD($element)
    {
        $locale = craft()->language;
        if ($element) {
            $entryMeta = craft()->seomatic->getMetaFromElement($element);
            if ($entryMeta) {
                $entryMeta = craft()->seomatic->setEntryMeta($entryMeta, $element->url);
            }
        }
        $metaVars = craft()->seomatic->getGlobals('', $locale);
        $result = craft()->seomatic->getMainEntityOfPageJSONLD($entryMeta, $metaVars['seomaticIdentity'], $locale, false);
        return $result;
    }