Page::mapApiFieldMethods($list, $Field, $type)
Version 3.8
Manipulate the list of allowed api field methods
Version 3.8
Manipulate the list of allowed api field methods
This function is run when page called via api.
Array $list
Add custom method to fields allowed methods:
function mapApiFieldMethods($list, $Field, $type='doc')
{
if ( $Field->getName('customer') ){
$list[] = Array(
'name' => 'getCustomerName',
'type' => 'String',
'example' => 'Customer name',
'description' => 'Return customer name',
'arguments' => Array(
Array(
'name' => '',
'type' => 'String'
'default' => '',
'description' => ''
)
),
'documentation' => true
);
return $list;
}