Current Record: beforeCopy #124

Return to Delegate class methods Table of Contents Synopsis Signature Parameters Returns See Also Synopsis A delegate class metho...

Current Record: beforeCopy #124

Return to Delegate class methods Table of Contents Synopsis Signature Parameters Returns See Also Synopsis A delegate class metho...

beforeCopy Delegate Class Method

[Permalink]

Return to Delegate class methods

Synopsis

A delegate class method that will be executed before a record is copied using the copy set or copy selected function. All xataface copies are shallow which means that related records are not copied by default. If you want a more complex copy function for a table you can implement functionality in this hook.

Available since version 1.3

Signature

function beforeCopy( Dataface_Record $original, array $values);

Parameters

  • $original - The original record that is to be copied.
  • $values - Associative array of values that are meant to be changed in the copy. Keys correspond with column names.

Returns

  • Either return nothing or you may return a PEAR_Error object to indicate that an error occurred with the copy.

See Also

  • afterCopy - The afterCopy hook that can be implemented in the delegate class to run just after a record is copied.
blog comments powered by Disqus
Powered by Xataface
(c) 2005-2024 All rights reserved