*/ class BsFileUploadFieldRenderer extends BsFieldRenderer { /** @var DBObjectSet */ private $oAttachmentsSet; public function __construct(Field $oField) { parent::__construct($oField); $oSearch = DBObjectSearch::FromOQL('SELECT Attachment WHERE item_class = :class AND item_id = :item_id'); // Note : AllowAllData set to true here instead of checking scope's flag because we are displaying a value that has been set and validated $oSearch->AllowAllData(); $sObjectClass = get_class($this->oField->GetObject()); $this->oAttachmentsSet = new DBObjectSet($oSearch, array(), array('class' => $sObjectClass, 'item_id' => $this->oField->GetObject()->GetKey())); } /** * @inheritDoc * @throws \CoreException */ public function Render() { $oOutput = parent::Render(); $sObjectClass = get_class($this->oField->GetObject()); $bIsDeleteAllowed = ($this->oField->GetAllowDelete() && !$this->oField->GetReadOnly()); $sTempId = utils::GetUploadTempId($this->oField->GetTransactionId()); $sUploadDropZoneLabel = Dict::S('Portal:Attachments:DropZone:Message'); // Starting field container $oOutput->AddHtml('