mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-11 03:53:13 +00:00
IUpdate databox fields and status
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||
* @link www.phraseanet.com
|
||||
*/
|
||||
class databox_subdefsStructure implements IteratorAggregate
|
||||
class databox_subdefsStructure implements IteratorAggregate, Countable
|
||||
{
|
||||
/**
|
||||
*
|
||||
@@ -31,6 +31,16 @@ class databox_subdefsStructure implements IteratorAggregate
|
||||
return new ArrayIterator($this->AvSubdefs);
|
||||
}
|
||||
|
||||
public function count()
|
||||
{
|
||||
$n = 0;
|
||||
foreach($this->AvSubdefs as $subdefs) {
|
||||
$n += count($subdefs);
|
||||
}
|
||||
|
||||
return $n;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param databox $databox
|
||||
|
Reference in New Issue
Block a user