MODX Cloud

The Most Productive MODX Learning Playground Ever

Claim Free Lab Account

set

Skip to end of metadata
Go to start of metadata


xPDOObject::set()

Set a field value by the field key or name.

Syntax

API Docs: http://api.modxcms.com/xpdo/om/xPDOObject.html#set

boolean set(
   string $k,
   [mixed $v = null],
   [string|callable $vType = '']
)

Examples

Set the object's name:

$object->set('name','Billy');
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.