Jump to main content Jump to doc navigation

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');