Version: current

     1 <?php
     2 /**
     3  * Расширение File - запрет сохранения файла если место для сайта исчерпано
     4  *
     5  * @author menedem
     6  */
     7 class FileOversizeDecorator extends DataObjectDecorator {
     8
     9     public function canCreate($member = null) {
    10         $sizeInfo = LeftAndMainQuota::sizeStatus();
    11         if ($sizeInfo->Blocked) {
    12             return false;
    13         }
    14         return true;
    15     }
    16 }
    17

[Raise a SilverStripe Framework issue/bug](https://github.com/silverstripe/silverstripe-framework/issues/new)
- [Raise a SilverStripe CMS issue/bug](https://github.com/silverstripe/silverstripe-cms/issues/new)
- Please use the Silverstripe Forums to ask development related questions. -