'title'); protected $_hasFilter = true; protected $_reorderTitleColumn = 'title'; protected function _getImagesIds() { $select = $this->_db->select(); $select->from($this->_getPair('Gallery'), array('id')); $select->where('`idCategory` = ?', $this->_primaryKey, \Qs_Db::INT_TYPE); return $this->_db->fetchCol($select); } protected function _deleteDependency() { $imagesIds = $this->_getImagesIds(); $imageObj = new GalleryAdmin\Obj(); foreach ($imagesIds as $imageId) { $imageObj->clearData(); $imageObj->setPrimaryKey($imageId); $imageObj->delete(); } return $this; } public function getReorderOptions($keyColumn = null, $titleColumn = null) { $keyColumn = (null === $keyColumn) ? $this->_reorderKeyColumn : $keyColumn; $titleColumn = (null === $titleColumn) ? $this->_reorderTitleColumn : $titleColumn; $list = $this->_db->fetchAll($this->_getReorderSelect()); $options = array(); foreach ($list as $row) { $options[$row[$keyColumn]] = $row['year'] . ' - ' . $row[$titleColumn]; } return $options; } }