25 foreach ($this->data as $res)
27 $fileInfo = $this->structure->getUnpackFile((
int)$res[
'FILE_ID']);
28 $file = !empty($fileInfo[
'PATH']) ? \CFile::makeFileArray($fileInfo[
'PATH']) :
null;
29 $file[
'name'] = $fileInfo[
'NAME'];
32 $result = Avatar\Mask\Item::create(
36 'TITLE' => $res[
'TITLE'],
37 'DESCRIPTION' => $res[
'DESCRIPTION'],
38 'ACCESS_CODE' => $this->owner->getDefaultAccess()
41 if (!$result->isSuccess())
43 $this->errorCollection->add($result->getErrors());