Jet\MVC_Page_MetaTag

By now you should be familiar with how Jet MVC works, what a base is, and what a page is.

So here we will just look at the overview of the methods of the Jet\MVC_Page_MetaTag class and also the Jet\MVC_Page_MetaTag_Interface interface.

The class is instantiated principally using factories.

Method Meaning of
public getPage(
): MVC_Page_Interface
Returns the identity of the page to which the meta tag belongs. So de facto parent entity.
public setPage(
MVC_Page_Interface $page
): void
Sets the page to which the meta tag belongs.
public getAttribute(
): string
Returns the attribute name of the meta tag (if the attribute is set - not required)

What is the attribute name?
In this example, it is "name" in <name="description" content="description text">
public getAttributeValue(
): string;
Returns the attribute value of the meta tag.

What is an attribute value?
In this example, it is "descriptionme" in <name="description" content="description text">
public setAttributeValue(
string $attribute_value
): void;
Sets the value of the meta tag attribute.
public getContent(
): string;
Returns the content of the meta tag.

In this example, it is the "Description text" in <name="description" content="Description text">:
public setContent(
string $content
): void;
Sets the content of the meta tag.
public toArray(
): array
Returns the meta tag definition data as an associated array. It is used to store the definition.
public __toString(): string The meta tag can be converted to a string - that is, an HTML tag can be created.
public toString(): string
Previous chapter
Content / Jet\MVC_Page_Content
Next chapter
Controller (Jet\MVC_Controller class)