Refactor caption_field

This commit is contained in:
Romain Neutron
2012-01-18 14:23:39 +01:00
parent de69f0357e
commit ba06115e4a
4 changed files with 128 additions and 70 deletions

View File

@@ -249,11 +249,15 @@ class API_V1_adapterTest extends PhraseanetPHPUnitAuthenticatedAbstract
$metadatas = array();
foreach (self::$record_1->get_caption()->get_fields() as $field)
{
$metadatas[] = array(
'meta_id' => $field->get_meta_id()
, 'meta_struct_id' => $field->get_meta_struct_id()
, 'value' => $field->get_value()
);
$values = $field->get_values();
foreach($values as $value)
{
$metadatas[] = array(
'meta_id' => $value->getId()
, 'meta_struct_id' => $field->get_meta_struct_id()
, 'value' => $value->getValue()
);
}
}
$metadatas = array_shift($metadatas);