* Registers the current field in the upload handler.
*/
private function registerField() {
- if (!UploadHandler::getInstance()->isRegisteredFieldId($this->getId())) {
+ if (!UploadHandler::getInstance()->isRegisteredFieldId($this->getPrefixedId())) {
UploadHandler::getInstance()->registerUploadField($this->buildUploadField());
}
}
* Unregisters the current field in the upload handler.
*/
private function unregisterField() {
- if (UploadHandler::getInstance()->isRegisteredFieldId($this->getId())) {
- UploadHandler::getInstance()->unregisterUploadField($this->getId());
+ if (UploadHandler::getInstance()->isRegisteredFieldId($this->getPrefixedId())) {
+ UploadHandler::getInstance()->unregisterUploadField($this->getPrefixedId());
}
}
* @return UploadField
*/
protected function buildUploadField() {
- $uploadField = new UploadField($this->getId());
+ $uploadField = new UploadField($this->getPrefixedId());
$uploadField->maxFiles = $this->getMaximum();
$uploadField->setImageOnly($this->isImageOnly());
$uploadField->setAllowSvgImage($this->svgImageAllowed());
* @return boolean
*/
private function isRegistered() {
- return UploadHandler::getInstance()->isRegisteredFieldId($this->getId());
+ return UploadHandler::getInstance()->isRegisteredFieldId($this->getPrefixedId());
}
/**
public function getValue() {
$this->registerField();
- return UploadHandler::getInstance()->getFilesByFieldId($this->getId());
+ return UploadHandler::getInstance()->getFilesByFieldId($this->getPrefixedId());
}
/**
public function getRemovedFiles($processFiles = false) {
$this->registerField();
- return UploadHandler::getInstance()->getRemovedFiledByFieldId($this->getId(), $processFiles);
+ return UploadHandler::getInstance()->getRemovedFiledByFieldId($this->getPrefixedId(), $processFiles);
}
/**
$this->registerField();
- UploadHandler::getInstance()->registerFilesByField($this->getId(), $value);
+ UploadHandler::getInstance()->registerFilesByField($this->getPrefixedId(), $value);
}
/**