PHP Класс Apple_Exporter\Components\Body

С версии: 0.2.0
Наследование: extends Component
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$needs_layout_if_anchored boolean Override. This component doesn't need a layout update if marked as the target of an anchor.

Защищенные свойства (Protected)

Свойство Тип Описание
$can_be_anchor_target boolean Quotes can be anchor targets.

Открытые методы

Метод Описание
node_matches ( DomNode $node ) : mixed Look for node matches for this component.
set_default_style ( ) Set the default style for the component.
to_array ( ) : array This component needs to ensure it didn't end up with empty content.

Защищенные методы

Метод Описание
build ( string $text ) Build the component.

Приватные методы

Метод Описание
get_col_start ( ) Get the start column for the body based on the layout.
get_default_style ( ) : array Get the default style for the component.
set_default_layout ( ) Set the default layout for the component.
set_initial_dropcap_style ( ) Set the initial dropcap style for the component.
split_non_markdownable ( string $html ) : array Split the non markdownable content for processing.

Описание методов

build() защищенный Метод

Build the component.
protected build ( string $text )
$text string

node_matches() публичный статический Метод

Look for node matches for this component.
public static node_matches ( DomNode $node ) : mixed
$node DomNode
Результат mixed

set_default_style() публичный Метод

Set the default style for the component.
public set_default_style ( )

to_array() публичный Метод

This will go through sanitize_text_field later as part of the assembled JSON. Therefore, tags aren't valid but we need to catch them now or we could encounter a parsing error when it's already too late. We also can't do this sooner, such as in build, because at that point the component could still contain nested, valid tags. We don't want to modify the JSON since it will still undergo further processing. We only want to check if, on its own, this component would end up empty.
public to_array ( ) : array
Результат array

Описание свойств

$can_be_anchor_target защищенное свойство

Quotes can be anchor targets.
protected bool $can_be_anchor_target
Результат boolean

$needs_layout_if_anchored публичное свойство

Override. This component doesn't need a layout update if marked as the target of an anchor.
public bool $needs_layout_if_anchored
Результат boolean