model/modx/modpropertyset.class.php

Classes 
extends
xPDOSimpleObject
package
modx
Classes
modPropertySet

Description

Represents a reusable set of properties for elements.

Each named property set can be associated with one or more element instances and can be called via a tag syntax or programatically.

\modPropertySet

Extends from
\xPDOSimpleObject
extends
xPDOSimpleObject
package
modx
Properties
$_properties
Methods
get
getElements
getProperties
remove
save
setProperties

Description

Represents a reusable set of properties for elements.

Each named property set can be associated with one or more element instances and can be called via a tag syntax or programatically.

Properties

$_properties

array $_properties = 'null'

The property value array for the element.

Details

array
visibility
protected
default
null
final
false
static
false
access
protected

Methods

get

get( \<type> $k, \<type> $format = null, \<type> $formatTemplate = null ) : \<type>

Overrides xPDOObject::get to handle when retrieving the properties field for an Element.

{@inheritdoc}

Arguments
$k
\<type>
$format
\<type>
$formatTemplate
\<type>
Output
\<type>
Details
visibility
public
final
false
static
false

getElements

getElements( ) : array

Get all the modElement instances this property set is available to.

Output
array
An array of modElement instances.
Details
visibility
public
final
false
static
false
access
public

getProperties

getProperties( array|string $properties = null ) : array

Get the properties for this element instance for processing.

Arguments
$properties
arraystring
An array or string of properties to apply.
Output
array
A simple array of properties ready to use for processing.
Details
visibility
public
final
false
static
false
access
public

remove

remove( array $ancestors = array ) : boolean

Overrides xPDOObject::remove to fire modX-specific events.

{@inheritDoc}

Arguments
$ancestors
array
Keeps track of classes which have already been removed to prevent loop with circular references.
Output
boolean
Returns true on success, false on failure.
Details
visibility
public
final
false
static
false

save

save( boolean $cacheFlag = null ) : boolean

Overrides xPDOObject::save to fire modX-specific events.

{@inheritDoc}

Arguments
$cacheFlag
boolean
Output
boolean
True if the save was successful
Details
visibility
public
final
false
static
false

setProperties

setProperties( array|string $properties, boolean $merge = false ) : boolean

Set properties for this modPropertySet instance.

Arguments
$properties
arraystring
A property array or property string.
$merge
boolean
Indicates if properties should be merged with existing ones.
Output
boolean
true if the properties are set.
Details
visibility
public
final
false
static
false
access
public
Documentation was generated by DocBlox 0.11.2.