mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 06:53:15 +00:00
WIP with cache
This commit is contained in:
@@ -79,7 +79,7 @@ class databox_subdefsStructure implements IteratorAggregate, Countable
|
||||
{
|
||||
$sx_struct = $this->databox->get_sxml_structure();
|
||||
|
||||
$this->AvSubdefs = [
|
||||
$avSubdefs = [
|
||||
'image' => [],
|
||||
'video' => [],
|
||||
'audio' => [],
|
||||
@@ -96,13 +96,14 @@ class databox_subdefsStructure implements IteratorAggregate, Countable
|
||||
foreach ($subdefgroup as $k => $subdefs) {
|
||||
$subdefgroup_name = strtolower($subdefs->attributes()->name);
|
||||
|
||||
if ( ! isset($AvSubdefs[$subdefgroup_name])) {
|
||||
$AvSubdefs[$subdefgroup_name] = [];
|
||||
if ( ! isset($avSubdefs[$subdefgroup_name])) {
|
||||
$avSubdefs[$subdefgroup_name] = [];
|
||||
}
|
||||
|
||||
foreach ($subdefs as $sd) {
|
||||
$subdef_name = strtolower($sd->attributes()->name);
|
||||
|
||||
$type = null;
|
||||
switch ($subdefgroup_name) {
|
||||
case 'audio':
|
||||
$type = new \Alchemy\Phrasea\Media\Type\Audio();
|
||||
@@ -121,13 +122,12 @@ class databox_subdefsStructure implements IteratorAggregate, Countable
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
|
||||
$AvSubdefs[$subdefgroup_name][$subdef_name] = new databox_subdef($type, $sd, $this->translator);
|
||||
$avSubdefs[$subdefgroup_name][$subdef_name] = new databox_subdef($type, $sd, $this->translator);
|
||||
}
|
||||
}
|
||||
$this->AvSubdefs = $AvSubdefs;
|
||||
$this->AvSubdefs = $avSubdefs;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
Reference in New Issue
Block a user