Documentation

jsonLd

Some items should be indexable by search engines using standards such as JSON-LD. This trait provides the base variables and interface for standard generation of this markup.

Table of Contents

Properties

$post_id  : int

Methods

getPermalink()  : string
Returns the permalink corresponding to the JSON-LD object.
printJsonLd()  : void
Print the full JSON-LD info, including script tags.
toJsonLD()  : object|null
Return an object that turns into JSON-LD as an event, compliant with schema.org. Return null if the object can't be printed to jsonLd for some reason (e.g. required fields are missing).

Properties

Methods

Returns the permalink corresponding to the JSON-LD object.

public getPermalink() : string
Return values
string

printJsonLd()

Print the full JSON-LD info, including script tags.

public static printJsonLd() : void

toJsonLD()

Return an object that turns into JSON-LD as an event, compliant with schema.org. Return null if the object can't be printed to jsonLd for some reason (e.g. required fields are missing).

public abstract toJsonLD() : object|null
Return values
object|null

        
On this page

Search results