from(\Qs_Db::getPair('UserCommitteeRole'), 'id') ->where('`leadership` = "y"'); static::$_leadershipRolesId = \Qs_Db::getInstance()->fetchCol($select); } return static::$_leadershipRolesId; } protected function _getCommitteeFiles() { $select = $this->_db->select(); $select->from($this->_getPair('Document'), 'fileName') ->where('`committeeId` = ?', $this->_primaryKey, \Qs_Db::INT_TYPE); return $this->_db->fetchCol($select); } protected function _deleteDependency() { $adapter = new \Qs_File_Transfer_Adapter_Db(); $files = $this->_getCommitteeFiles(); foreach ($files as $fileName) { $adapter->delete($fileName, 'fileName'); } unset($adapter); return parent::_deleteDependency(); } }