addFieldAlias
Last updated not available | Page history | Improve this page | Report an issue
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$194 per month—let's make that $500!
Learn morexPDOObject::addFieldAlias¶
Adds an alias for a field of the object. The alias is registered globally for the class (in the class's fieldAliases map), so it is available on every instance of that class in the request.
Syntax¶
boolean addFieldAlias (string $field, string $alias)
Example¶
$store = $xpdo->getObject('sfStore', 1);
$store->addFieldAlias('zip', 'postalcode');
echo $store->get('postalcode');
See Also¶
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$194 per month—let's make that $500!
Learn more










