\CGExtensionscontent_list_builder

A utility class to build a set of options for a page dropdown.

Summary

Methods
Properties
Constants
__construct()
get_content_list()
get_options()
$parent
$current
$show_unlinkable
$show_disabled
$show_navhidden
$spacer
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$parent

$parent : int|string

The page id or alias of the parent page for the output options. Only descendents of this page will be shown.

Type

int|string

$current

$current : int|string

The page id or alias of the currently selected page.

Type

int|string

$show_unlinkable

$show_unlinkable : bool

Show content types (like separators etc) that do not have usable links.

Type

bool

$show_disabled

$show_disabled : bool

Show disabled content pages.

Type

bool

$show_navhidden

$show_navhidden : bool

show content objects that are not shown in menu.

Type

bool

$spacer

$spacer : string

The prefix before each option text to illustrate its relative depth.

Type

string

Methods

__construct()

__construct(array $params)

Constructor

Parameters

array $params

array of settings/properties for this object.

get_content_list()

get_content_list() : array

Get a list of matching records.

This method returns an array of hashes. Each row in the resultset will have val,title,label,selected,disabled members.

A consumer of this output can then parse these records and build a suitable option list for a dropdown.

Returns

array

get_options()

get_options() : string

Get html options suitable for use in a dropdown that represent the pages that match the criteria specified.

Returns

string