'LinkedIn URL', ]; protected $_previousData = []; public function getPlaceholdersData() { /** @var $doc \App_Doc_User */ $doc = Zend_Registry::get('doc'); if ($doc->hasAuth()) { $id = $doc->getAuth()->getData('id'); $data = $this->_getFromDb($id); if ('y' == Qs_Array::get($data, 'shipping[asBilling]')) { $data['shipping']['asBilling'] = 'Yes'; $data['shipping'] = array_merge($data['shipping'], $data['billing']); } else { $data['shipping']['asBilling'] = 'No'; } $data = Qs_Array::flattenAssoc($data, true); $this->_preparePlaceholders($data); $this->_setHtmlPlaceholdersData($data); } return parent::getPlaceholdersData(); } public function getPlaceholdersPreviewData() { $data = $this->getConfig('previewData')->htmlPlaceholders->toArray(); $this->_preparePlaceholders($data); $this->_setHtmlPlaceholdersData($data); return parent::getPlaceholdersData(); } protected function _preparePlaceholders(array &$data) { foreach ($this->_htmlPlaceholdersFields as $field) { if (!Qs_Array::get($data, $field)) { $data[$field] = '-'; } } return $this; } public function update(array $data = null) { $this->_initPreviewData(); return parent::update($data); } protected function _initPreviewData() { if ($primaryKey = $this->getPrimaryKey()) { $this->_previousData = $this->_getFromDb($primaryKey); } return $this; } public function getPreviousData() { return $this->_previousData; } }