Webylon 3.1 API Docs
  • Package
  • Class
  • Tree
  • Deprecated
  • Download
Version: current
  • 3.2
  • 3.1

Packages

  • auth
  • Booking
  • cart
    • shipping
    • steppedcheckout
  • Catalog
  • cms
    • assets
    • batchaction
    • batchactions
    • bulkloading
    • comments
    • content
    • core
    • export
    • newsletter
    • publishers
    • reports
    • security
    • tasks
  • Dashboard
  • DataObjectManager
  • event
  • faq
  • forms
    • actions
    • core
    • fields-basic
    • fields-dataless
    • fields-datetime
    • fields-files
    • fields-formatted
    • fields-formattedinput
    • fields-relational
    • fields-structural
    • transformations
    • validators
  • googlesitemaps
  • guestbook
  • installer
  • newsletter
  • None
  • photo
    • gallery
  • PHP
  • polls
  • recaptcha
  • sapphire
    • api
    • bulkloading
    • control
    • core
    • cron
    • dev
    • email
    • fields-formattedinput
    • filesystem
    • formatters
    • forms
    • i18n
    • integration
    • misc
    • model
    • parsers
    • search
    • security
    • tasks
    • testing
    • tools
    • validation
    • view
    • widgets
  • seo
    • open
      • graph
  • sfDateTimePlugin
  • spamprotection
  • stealth
    • captha
  • subsites
  • userform
    • pagetypes
  • userforms
  • webylon
  • widgets

Classes

  • Aggregate
  • Aggregate_Relationship
  • AssetAdminQuotaExtension
  • AttachedFilesExtension
  • BookingWidget
  • CheckoutPageExchangeExtension
  • ClassInfo
  • ControllerRedirectExtension
  • CSSContentParser
  • DisableJSValidation
  • Extension
  • HtmlEditorQuotaExtension
  • ManifestBuilder
  • MobileExtension
  • Object
  • PaymentMethodAutoHide
  • ProductSearchFormExtension
  • SS_Cache
  • TokenisedRegularExpression
  • ValidationResult
  • YamlFixture

Functions

  • __autoload
  • _t
  • array_fill_keys
  • getClassFile
  • getSysTempDir
  • getTempFolder
  • increase_memory_limit_to
  • increase_time_limit_to
  • project
  • singleton
  • stripslashes_recursively
  • translate_memstring
 1 <?php
 2 /*
 3  * Расширение для HtmlEditorField_Toolbar для запрета загрузки файлов при привышении квоты 
 4  *
 5  * @author menedem
 6  */
 7 
 8 class HtmlEditorQuotaExtension extends Extension {
 9     function extraStatics() {
10     }
11     
12     function updateImageForm(& $form) {     
13         $sizeInfo = LeftAndMainQuota::sizeStatus();
14         if ($sizeInfo->Blocked) {
15             $form->Fields()->removeByName('ShowUpload');    
16             $form->Fields()->removeByName('Files[0]');
17             $form->Fields()->removeByName('Response');
18             $form->Fields()->removeByName('UploadMode');
19             
20             $form->Fields()->insertAfter(new LiteralField('ShowUpload', '<p class="showUploadField"><a href="#" class="uploadDisable">'. _t('HtmlEditorField.UPLOADDISABLE', 'UPLOAD DISABLE') .'</a></p>'), 'FolderID');
21             
22         //  debug::show($form->Fields());
23             
24             //$form->Fields()->insertAfter(new LiteralField('Quota', '<div id="QuotaExceded">'._t('HtmlEditorField.QuotaExceded', 'Quota Exceded').'</div>'), 'FolderID');
25         }
26     }
27 }
[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. -
Webylon 3.1 API Docs API documentation generated by ApiGen 2.8.0