'fullBio'); protected $_filterFields = array('name', 'jobTitle', 'fullBioStripped'); protected function _insertDependency() { $this->_saveDependency(); return parent::_insertDependency(); } protected function _updateDependency() { $this->_deleteIds('PeopleSocialLink', 'peopleId'); $this->_saveDependency(); return parent::_updateDependency(); } protected function _saveDependency() { $this->_saveSocialLinkDependency(); return $this; } protected function _saveSocialLinkDependency() { $socialLinks = self::getSocialLinks(); $table = new \Qs_Db_Table('PeopleSocialLink'); foreach ($socialLinks as $socialLink) { if (!empty($this->_data['socialLink' . $socialLink['id']])) { $table->insert(array( 'peopleId' => $this->_primaryKey, 'linkId' => $socialLink['id'], 'link' => $this->_data['socialLink' . $socialLink['id']], ) ); } } return $this; } protected function _addSocialLinks(&$data) { $ownSocialLinks = $this->_getOwnSocialLinks(); foreach ($ownSocialLinks as $socialLink) { $data['socialLink' . $socialLink['linkId']] = $socialLink['link']; } return $this; } }