FilterList(function ($oItem) { return $oItem && $oItem->IsLinked(); }); } /** * @return array */ public function UnlinkedAttachments() { return $this->FilterList(function ($oItem) { return $oItem && !$oItem->IsLinked(); }); } /** * @return int */ public function SizeOfAttachments() { $iResult = 0; $this->ForeachList(function ($oItem) use (&$iResult) { if ($oItem) { $iResult += $oItem->FileSize(); } }); return $iResult; } }