public function getFileTransfer() { if ($this->fileTransfer) { return $this->fileTransfer; } $this->initFileTransfer(); $fileTransferOptions = $this->getFileTransferOptions(); return $fileTransferOptions ? $this->fileTransfer = TransferFactory::factory($fileTransferOptions) : $this->fileTransfer; }
public function isValid() { if (!$this->getFileTransfer()) { return parent::isValid(); } $elementValid = parent::isValid(); $fileValid = $this->fileTransfer->isValid(); $result = $elementValid && $fileValid; $this->isValid = $result; if (!$result) { $fileTransferMessages = $this->fileTransfer->getMessages(); if ($fileTransferMessages) { $this->fileTransferMessages = $fileTransferMessages = $this->resortFileTransferMessages($fileTransferMessages); } $this->setMessages($fileTransferMessages); } return $result; }