Jinya CMS

ModernPageSection
in package
Uses EntityTrait

This class contains a segment of segment pages. Segments can contain different kinds of data, currently supported are galleries, files, and static HTML content. If the data is a file, it is also possible to specify an action which can be either script or link. Depending on the action, the fields have to be set accordingly.

Tags

Table of Contents

$action  : string|null
$fileId  : int|null
$galleryId  : int|null
$html  : string|null
$id  : int
$pageId  : int
$position  : int
$script  : string|null
$target  : string|null
format()  : array<string, array<string, int|string|null>|int|string|null>
Formats the segment into an array
getFile()  : File|null
Gets the file
getGallery()  : Gallery|null
Gets the gallery
getModernPage()  : ModernPage|null
Gets the corresponding segment page
getSegmentPage()  : ModernPage|null
Gets the corresponding segment page

Properties

$action

public string|null $action = null

The action type to execute when the file is clicked. It can be either script, link or none

Tags

$galleryId

public int|null $galleryId = null

The gallery in the segment

Tags

$pageId

public int $pageId

The ID of the segment page this segment belongs to

Tags

$script

public string|null $script = null

The script to execute when the file is clicked

Tags

$target

public string|null $target = null

The link to open when the file is clicked

Tags

Methods

format()

Formats the segment into an array

public format() : array<string, array<string, int|string|null>|int|string|null>
Tags
Return values
array<string, array<string, int|string|null>|int|string|null>

getSegmentPage()

Gets the corresponding segment page

public getSegmentPage() : ModernPage|null
Tags
deprecated

Use getModernPage instead

codeCoverageIgnore
Return values
ModernPage|null

Search results