function cmis_field_field in CMIS API 6.3
Same name and namespace in other branches
- 6.4 cmis_field/cmis_field.module \cmis_field_field()
Implementation of hook_field()
Parameters
$op - operation:
$node - node:
$field - field settings:
$items - field value(s):
$teaser - boolean for whether or not we're displaying a teaser:
$page - boolean for whether or not we're displaying a page:
Return value
unknown_type
File
- cmis_field/
cmis_field.module, line 59
Code
function cmis_field_field($op, &$node, $field, &$items, $teaser, $page) {
switch ($op) {
case 'validate':
foreach ($items as $i) {
if (empty($i)) {
form_set_error('', 'The field cannot be empty');
}
}
return $items;
break;
}
}