eZ\Publish\Core\Persistence\Legacy\Content\Language\Gateway::canDeleteLanguage PHP Method

canDeleteLanguage() abstract public method

Check whether a language may be deleted.
abstract public canDeleteLanguage ( integer $id ) : boolean
$id integer
return boolean
    public abstract function canDeleteLanguage($id);

Usage Example

Example #1
0
 /**
  * Delete a language.
  *
  * @param mixed $id
  *
  * @throws LogicException If language could not be deleted
  */
 public function delete($id)
 {
     if (!$this->languageGateway->canDeleteLanguage($id)) {
         throw new LogicException("Deleting language logic error, some content still references that language and therefore it can't be deleted");
     }
     $this->languageGateway->deleteLanguage($id);
 }
All Usage Examples Of eZ\Publish\Core\Persistence\Legacy\Content\Language\Gateway::canDeleteLanguage