# \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

File
  lib/class.content_list_builder.php
Package
  \CGExtensions
Class hierarchy
  \CGExtensions\content_list_builder

## Tags

todo |

## 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

#

## Tags

None found

### $current

    $current : int|string

The page id or alias of the currently selected page.

#### Type

int|string

#

## Tags

None found

### $show_unlinkable

    $show_unlinkable : bool

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

#### Type

bool

#

## Tags

None found

### $show_disabled

    $show_disabled : bool

Show disabled content pages.

#### Type

bool

#

## Tags

None found

### $show_navhidden

    $show_navhidden : bool

show content objects that are not shown in menu.

#### Type

bool

#

## Tags

None found

### $spacer

    $spacer : string

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

#### Type

string

#

## Tags

None found

## Methods

### __construct()

    __construct(array $params)

Constructor

#### Parameters

array | $params | array of settings/properties for this object.

#

## Tags

todo |

### 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

#

See also

## Tags

todo |

### 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

#

## Tags

todo |

### class.content_list_builder.php