Class 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.

  • extends: xPDOSimpleObject

Located in /model/modx/modpropertyset.class.php (line 11)

xPDOObject
   |
   --xPDOSimpleObject
      |
      --modPropertySet
Variable Summary
 array $_properties
Method Summary
 void get ( $k, [ $format = null], [ $formatTemplate = null])
 array getElements ()
 array getProperties ([array|string $properties = null])
 void remove ([ $ancestors = array()])
 void save ([ $cacheFlag = null])
 boolean setProperties (array|string $properties, [boolean $merge = false])
Variables
Methods
get (line 41)

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

  • access: public
void get ( $k, [ $format = null], [ $formatTemplate = null])
  • $k
  • $format
  • $formatTemplate

Redefinition of:
xPDOObject::get()
Get a field value (or a set of values) by the field key(s) or name(s).
getElements (line 25)

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

  • return: An array of modElement instances.
  • access: public
array getElements ()
getProperties (line 70)

Get the properties for this element instance for processing.

  • return: A simple array of properties ready to use for processing.
  • access: public
array getProperties ([array|string $properties = null])
  • array|string $properties: An array or string of properties to apply.
remove (line 186)

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

{@inheritDoc}

  • access: public
void remove ([ $ancestors = array()])
  • array $ancestors

Redefinition of:
xPDOObject::remove()
Remove the persistent instance of an object permanently.
save (line 159)

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

{@inheritDoc}

  • access: public
void save ([ $cacheFlag = null])
  • $cacheFlag

Redefinition of:
xPDOObject::save()
Persist new or changed objects to the database container.
setProperties (line 88)

Set properties for this modPropertySet instance.

  • return: true if the properties are set.
  • access: public
boolean setProperties (array|string $properties, [boolean $merge = false])
  • array|string $properties: A property array or property string.
  • boolean $merge: Indicates if properties should be merged with existing ones.

Inherited Methods

Inherited From xPDOObject

 xPDOObject::__construct()
 xPDOObject::addMany()
 xPDOObject::addOne()
 xPDOObject::addValidationRule()
 xPDOObject::encode()
 xPDOObject::fromArray()
 xPDOObject::fromJSON()
 xPDOObject::get()
 xPDOObject::getFieldName()
 xPDOObject::getFKClass()
 xPDOObject::getFKDefinition()
 xPDOObject::getMany()
 xPDOObject::getOne()
 xPDOObject::getOption()
 xPDOObject::getPK()
 xPDOObject::getPKType()
 xPDOObject::getPrimaryKey()
 xPDOObject::getSelectColumns()
 xPDOObject::getValidator()
 xPDOObject::isDirty()
 xPDOObject::isLazy()
 xPDOObject::isNew()
 xPDOObject::isValidated()
 xPDOObject::load()
 xPDOObject::loadCollection()
 xPDOObject::loadCollectionGraph()
 xPDOObject::remove()
 xPDOObject::removeValidationRules()
 xPDOObject::save()
 xPDOObject::set()
 xPDOObject::setDirty()
 xPDOObject::setOption()
 xPDOObject::toArray()
 xPDOObject::toJSON()
 xPDOObject::validate()
 xPDOObject::_getAliases()
 xPDOObject::_getDataType()
 xPDOObject::_getPHPType()
 xPDOObject::_getRelatedObjectsByFK()
 xPDOObject::_initFields()
 xPDOObject::_loadCollectionInstance()
 xPDOObject::_loadFieldData()
 xPDOObject::_loadInstance()
 xPDOObject::_loadRows()
 xPDOObject::_loadValidation()
 xPDOObject::_saveRelatedObject()
 xPDOObject::_saveRelatedObjects()
 xPDOObject::_setRaw()

Documentation generated on Fri, 17 Jun 2011 10:03:44 -0600 by phpDocumentor 1.4.3