/** * Returns the output of the field type. * * @since 2.1.5 Moved from the AdminPageFramework_FormField class. The name was changed from getHiddenField(). * @since 3.3.1 Changed from `_replyToGetField()`. */ protected function getField($aField) { /* Set some required values */ $aField['attributes']['name'] = "__import[submit][{$aField['input_id']}]"; $aField['label'] = $aField['label'] ? $aField['label'] : $this->oMsg->get('import'); return parent::getField($aField); }
protected function getField($aField) { if (isset($aField['data'])) { $this->setTransient(md5("{$aField['class_name']}_{$aField['input_id']}"), $aField['data'], 60 * 2); } $aField['attributes']['name'] = "__export[submit][{$aField['input_id']}]"; $aField['file_name'] = $aField['file_name'] ? $aField['file_name'] : $this->_generateExportFileName($aField['option_key'] ? $aField['option_key'] : $aField['class_name'], $aField['format']); $aField['label'] = $aField['label'] ? $aField['label'] : $this->oMsg->get('export'); return parent::getField($aField); }
/** * Returns the output of the field type. * * @since 2.1.5 Moved from the AdminPageFramework_FormField class. The name was changed from getHiddenField(). * @since 3.3.1 Changed from `_replyToGetField()`. */ protected function getField($aField) { /* Set the transient data to export - If the value is not an array and the export data is set. */ if (isset($aField['data'])) { $this->setTransient(md5("{$aField['class_name']}_{$aField['input_id']}"), $aField['data'], 60 * 2); // 2 minutes. } /* Set some required values */ $aField['attributes']['name'] = "__export[submit][{$aField['input_id']}]"; $aField['file_name'] = $aField['file_name'] ? $aField['file_name'] : $this->_generateExportFileName($aField['option_key'] ? $aField['option_key'] : $aField['class_name'], $aField['format']); $aField['label'] = $aField['label'] ? $aField['label'] : $this->oMsg->get('export'); return parent::getField($aField); }