setOption

Welcome to the MODX Documentation. It is an ongoing effort of the MODX community. If you would like to participate or if you notice any errors or missing content, please let us know.

xPDOObject::setOption()

Sets an option value for this instance of an xPDOObject.

Syntax

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

void setOption(
    string $key,
    mixed $value
)

Example

$object->setOption(xPDO::OPT_HYDRATE_FIELDS,true);