Exemple #1
0
 /**
  * Удаление записи в справочнике
  * 
  * @return void
  */
 public function deleteentryAction()
 {
     if (isset($this->_params['entryid']) && ($EntryInfo = $this->Dictionaries->getEntryInfo($this->_params['entryid']))) {
         $redirect = '/control/dictionaries/entries/dictionaryid/' . $EntryInfo['dictionaryid'] . '/';
         if ($this->Dictionaries->deleteEntry($EntryInfo['entryid'])) {
             return $this->composeSuccessMessage('Выбранная запись удалена', $redirect);
         } else {
             return $this->composeDeleteErrorMessage($this->Dictionaries->_errors, $redirect);
         }
     } else {
         return $this->composeErrorMessage('Запись с указанным Id не найдена', '/control/dictionaries/');
     }
 }