mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-09 19:13:26 +00:00
Merge branch '3.6' of github.com:alchemy-fr/Phraseanet into 3.6
This commit is contained in:
@@ -204,6 +204,25 @@ class API_V1_adapter extends API_V1_Abstract
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function caption_records(Request $request, $databox_id, $record_id)
|
||||
{
|
||||
$result = new API_V1_result($request, $this);
|
||||
|
||||
$record = $this->appbox->get_databox($databox_id)->get_record($record_id);
|
||||
$fields = $record->get_caption()->get_fields();
|
||||
$ret = array();
|
||||
foreach ($fields as $field)
|
||||
{
|
||||
$ret[$field->get_meta_struct_id()] = array(
|
||||
'meta_structure_id' => $field->get_meta_struct_id()
|
||||
, 'name' => $field->get_name()
|
||||
, 'value' => $field->get_serialized_values(";")
|
||||
);
|
||||
}
|
||||
$result->set_datas($ret);
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get an API_V1_result containing the results of a records search
|
||||
*
|
||||
|
Reference in New Issue
Block a user