static bool hasCopyableRecords(
&$node, [string
$selector = ''], atkNode
$node
)
|
|
Returns true if there is something to copy. This is used to determine if we can skip the whole dialog and continue to the add page directly.
Parameters:
|
atkNode |
$node: |
The node to check |
|
string |
$selector: |
an extra selector to add to the count query |
|
|
&$node: |
|
API Tags:
| Return: | true when there are records to copy, false if there are none |
string getAddOrCopyPage(
)
|
|
Returns the add or copy page contents.
API Tags:
| Return: | add or copy page contents |
Returns the add or copy page contents.
API Tags:
| Return: | add or copy page contents |
string getCopyDropDown(
Array
$records
)
|
|
Creates a drop-down with copyable records.
Parameters:
|
Array |
$records: |
Array with records |
API Tags:
| Return: | copyable records drop-down |
void getCopyIncludes(
atkNode
$node, [String
$prefix = ''], [Integer
$level = 0]
)
|
|
Returns a HTML fragment which allows the user to select nested one-to-many relations he/she wants to include in the copy.
Parameters:
|
atkNode |
$node: |
The node to get the onetomany relations from |
|
String |
$prefix: |
The field prefix |
|
Integer |
$level: |
The level of the includes |
Returns the copy option
API Tags:
Returns the form start.
API Tags:
Returns the new option.
API Tags:
string getOptionLabel(
string
$action
)
|
|
Returns the option label for the given action.
Parameters:
|
string |
$action: |
action (copy or add) |
API Tags:
| Return: | option label for action |
Returns the process URL.
API Tags:
void handleCopy(
[string
$attrRefreshUrl = null]
)
|
|
Handle copy.
Parameters:
|
string |
$attrRefreshUrl: |
the attribute refresh url if not specified the entire page is refreshed |
void preCopy(
&$record,
&$node, array
$includes, [string
$prefix = ""], array
$record, atkNode
$node
)
|
|
Remove one-to-many relations which the user didn't explicitly select.
Parameters:
|
array |
$record: |
record |
|
atkNode |
$node: |
node reference |
|
array |
$includes: |
include list |
|
string |
$prefix: |
current prefix |
|
|
&$record: |
|
|
|
&$node: |
|
string renderAddOrCopyPage(
array
$params
)
|
|
Render the add or copy page using the given parameters.
Parameters:
|
array |
$params: |
parameters |
API Tags:
void setProcessUrl(
string
$url
)
|
|
Override the default process URL.
Parameters: