public function getObject($objectType, array $properties, $add_underscore = true, $include_empty_fields = false) { $object = parent::getObject($objectType, $properties, $add_underscore, $include_empty_fields); // Add file content if avilable $upload = new Zend_File_Transfer_Adapter_Http(); $files = $upload->getFileInfo(); if (isset($files['sshPublicKey'])) { $file = $files['sshPublicKey']; if ($file['size']) { $content = file_get_contents($file['tmp_name']); $object->publicKey = $content; } } if (isset($files['sshPrivateKey'])) { $file = $files['sshPrivateKey']; if ($file['size']) { $content = file_get_contents($file['tmp_name']); $object->privateKey = $content; } } $object->pathManagerParams = json_decode($properties['pathManagerParams'], true); return $object; }
public function init() { parent::init(); $this->addElement('text', 'serviceToken', array('label' => 'Kontiki Service Token', 'filters' => array('StringTrim'))); $this->addElementToDisplayGroup('storage_info', 'serviceToken'); }
public function getObject($objectType, array $properties, $add_underscore = true, $include_empty_fields = false) { $object = parent::getObject($objectType, $properties, $add_underscore, $include_empty_fields); $object->pathManagerParams = json_decode($properties['pathManagerParams'], true); return $object; }