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

Packages

  • 1c
    • exchange
      • catalog
  • auth
  • Booking
  • building
    • company
  • cart
    • shipping
    • steppedcheckout
  • Catalog
    • monument
  • 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

  • Address
  • AddSubsiteTask
  • Announcement
  • AnnouncementDecorator
  • AnnouncementHolder
  • AssociatedFolderDecorator
  • AttachedFiles
  • AudioPhpCaptcha
  • AutoCompleteField
  • Base1CExchanger
  • BookingOrder_StatusLog
  • CalendarUtil
  • CalendarWidgetExtention
  • CatalogCatalogLinkedDecorator
  • CatalogOldFieldsDecorator
  • CatalogProductLinkedDecorator
  • CheckoutStep_ShippingMethod
  • ChequePayment
  • ClearHistoryTask
  • ClientEmailOrderNotification_SiteConfig
  • ClientVKOrderNotification_SiteConfig
  • CommentsSiteConfig
  • ContactsPage
  • CookieExtention
  • CostTableShippingRate
  • CustomMenu
  • CustomMenuAdmin
  • CustomMenuDecorator
  • CustomMenuHolder
  • CustomMenuItem
  • CustomPayment
  • DataObjectLoggerExtension
  • DataObjectSubsites
  • DefaultCMSActionDecorator
  • DocPage
  • DocumentDirection
  • DocumentHaving
  • DocumentSearchForm
  • DocumentSiteConfig
  • DocumentsPage
  • DocumentType
  • DOMUtil
  • ExtendPageAnnouncement
  • ExtendPagePoll
  • FavoriteExtention
  • FavoritePage
  • FavoriteProductMemberExtention
  • FavoriteProducts
  • FileOversizeDecorator
  • FindCyrillicSiteConfig
  • FolderRenameTask
  • GDMergeAlpha
  • HomePage
  • ImageAutoResize
  • ImageResizeTask
  • ImportCatalog1C_Importer
  • ImportCatalogSiteConfig
  • ImportSiteConfig
  • LoggerAdmin
  • LogItem
  • ManagerEmailOrderNotification_SiteConfig
  • MapObject
  • MapObjectGroup
  • MapPage
  • MediawebForm
  • MemberLoggerExtension
  • MonumentsSiteConfig
  • MultiUploadConfig
  • NearestEventExtention
  • NewDocumentsAdmin
  • NewsArchive
  • NewsEntry
  • NewsHolder
  • NewsSiteConfig
  • Order_StatusLog
  • Orders1CExchange_Exporter
  • PageHideFieldsExtension
  • PageInformerRates
  • PageInformerWeather
  • Payment_Failure
  • Payment_Processing
  • Payment_Result
  • Payment_Success
  • PaymentMethod
  • PaymentSiteConfig
  • PayPalPayment
  • PayPalPayment_Handler
  • PhoneField
  • PhotoAlbumExtentions
  • PhpCaptcha
  • PhpCaptchaColour
  • PhpCaptchaField
  • phpMorphy
  • phpMorphy_AncodesResolver_AsIs
  • phpMorphy_AncodesResolver_Proxy
  • phpMorphy_AncodesResolver_ToDialingAncodes
  • phpMorphy_AncodesResolver_ToText
  • phpMorphy_AnnotDecoder_Base
  • phpMorphy_AnnotDecoder_Common
  • phpMorphy_AnnotDecoder_Factory
  • phpMorphy_AnnotDecoder_Predict
  • phpMorphy_FilesBundle
  • phpMorphy_Fsa
  • phpMorphy_Fsa_Decorator
  • phpMorphy_Fsa_Proxy
  • phpMorphy_Fsa_Sparse_File
  • phpMorphy_Fsa_Sparse_Mem
  • phpMorphy_Fsa_Sparse_Shm
  • phpMorphy_Fsa_Tree_File
  • phpMorphy_Fsa_Tree_Mem
  • phpMorphy_Fsa_Tree_Shm
  • phpMorphy_Fsa_WordsCollector
  • phpMorphy_GramInfo
  • phpMorphy_GramInfo_AncodeCache
  • phpMorphy_GramInfo_Decorator
  • phpMorphy_Graminfo_File
  • phpMorphy_Graminfo_Mem
  • phpMorphy_GramInfo_Proxy
  • phpMorphy_GramInfo_Proxy_WithHeader
  • phpMorphy_GramInfo_RuntimeCaching
  • phpMorphy_Graminfo_Shm
  • phpMorphy_GrammemsProvider_Base
  • phpMorphy_GrammemsProvider_Decorator
  • phpMorphy_GrammemsProvider_Empty
  • phpMorphy_GrammemsProvider_Factory
  • phpMorphy_GrammemsProvider_ForFactory
  • phpMorphy_GrammemsProvider_ru_RU
  • phpMorphy_GramTab
  • phpMorphy_GramTab_Empty
  • phpMorphy_GramTab_Proxy
  • phpMorphy_Link
  • phpMorphy_Link_Annot
  • phpMorphy_Link_Base
  • phpMorphy_Morphier_Base
  • phpMorphy_Morphier_Bulk
  • phpMorphy_Morphier_Common
  • phpMorphy_Morphier_Empty
  • phpMorphy_Morphier_Finder_Base
  • phpMorphy_Morphier_Finder_Common
  • phpMorphy_Morphier_Finder_Predict_Databse
  • phpMorphy_Morphier_Finder_Predict_Suffix
  • phpMorphy_Morphier_Helper
  • phpMorphy_Morphier_Predict_Database
  • phpMorphy_Morphier_Predict_Suffix
  • phpMorphy_Morphier_PredictCollector
  • phpMorphy_Semaphore
  • phpMorphy_Semaphore_Empty
  • phpMorphy_Semaphore_Nix
  • phpMorphy_Semaphore_Win
  • phpMorphy_Shm_Cache
  • phpMorphy_Shm_Cache_FileDescriptor
  • phpMorphy_Shm_Header
  • phpMorphy_Source_Dba
  • phpMorphy_Source_Fsa
  • phpMorphy_State
  • phpMorphy_Storage
  • phpMorphy_Storage_Factory
  • phpMorphy_Storage_File
  • phpMorphy_Storage_Mem
  • phpMorphy_Storage_Proxy
  • phpMorphy_Storage_Shm
  • phpMorphy_UnicodeHelper
  • phpMorphy_UnicodeHelper_Base
  • phpMorphy_UnicodeHelper_MultiByteFixed
  • phpMorphy_UnicodeHelper_singlebyte
  • phpMorphy_UnicodeHelper_ucs_2be
  • phpMorphy_UnicodeHelper_ucs_2le
  • phpMorphy_UnicodeHelper_ucs_4be
  • phpMorphy_UnicodeHelper_ucs_4le
  • phpMorphy_UnicodeHelper_utf_16_Base
  • phpMorphy_UnicodeHelper_utf_16be
  • phpMorphy_UnicodeHelper_utf_16le
  • phpMorphy_UnicodeHelper_utf_32_Base
  • phpMorphy_UnicodeHelper_utf_32be
  • phpMorphy_UnicodeHelper_utf_32le
  • phpMorphy_UnicodeHelper_utf_8
  • phpMorphy_WordDescriptor
  • phpMorphy_WordDescriptor_Collection
  • phpMorphy_WordDescriptor_Collection_Serializer
  • phpMorphy_WordForm
  • ProductCatalogImportTask
  • ProductOldFieldsDecorator
  • ProductParamValue_BoolValueField
  • ProductParamValue_MultiValueField
  • ProductParamValue_MultiValueSetField
  • ProductParamValue_ValueField
  • ProductProductLinkedDecorator
  • PublHolder
  • Publication
  • PublicationSiteTree
  • RatingDataObject
  • RatingExtension
  • RealtySiteConfigDecorator
  • RecentComments
  • RecentFiles
  • RecentPages
  • RelatedPageLink
  • RoomRate_PriceField
  • RussianUpLower
  • SberbankPayment
  • SberbankPayment_Handler
  • SetMainSiteHomePageTypeTask
  • ShippingEstimator
  • ShippingPackage
  • ShowUserFromExtension
  • ShowViewedProductExtention
  • SiteConfigDecorator
  • SiteConfigSubsites
  • SiteTreeSubsites
  • SMSCOrderNotification_SiteConfig
  • SMSOrderNotification_SiteConfig
  • Socle
  • SocleSize
  • SortCMSActionDecorator
  • SS_Report_FakeQuery
  • SSMorphy
  • SSNController
  • SteppedCheckout_PageMessages
  • SubpageListField
  • SubscribeFormAllPagesExtension
  • SubsiteDropdownField
  • SubsiteReportWrapper
  • TableShippingRate
  • UnitellerPayment
  • UnitellerPayment_Handler
  • UnmoderatedComments
  • VAT
  • VideoManager
  • VideoSiteConfig
  • ViewedProductExtention
  • WatermarkImage
  • WatermarkSiteConfig
  • WeightTableShippingRate
  • XMLValidate
  • YaMoneyPayment
  • YaMoneyPayment_Handler
  • YMLExporter
  • YMLSiteConfig

Interfaces

  • PaymentObjectInterface
  • phpMorphy_AncodesResolver_Interface
  • phpMorphy_AnnotDecoder_Interface
  • phpMorphy_Fsa_Interface
  • phpMorphy_GramInfo_Interace
  • phpMorphy_GrammemsProvider_Interface
  • phpMorphy_GramTab_Interface
  • phpMorphy_Morphier_Finder_Interface
  • phpMorphy_Morphier_Interface
  • phpMorphy_Shm_Cache_Interface
  • phpMorphy_Source_Interface

Exceptions

  • phpMorphy_Exception

Functions

  • column_sort
  • column_sort_callback_basic
  • encodeFileForEmail
  • encodeMultipart
  • getMimeType
  • htmlEmail
  • loadMimeTypes
  • phpmorphy_overload_mb_funcs
  • plaintextEmail
  • processHeaders
  • QuotedPrintable_encode
  • supressOutput
  • validEmailAddr
  • wrapImagesInline
  • wrapImagesInline_rewriter
  1 <?php
  2 // Расширение конфига сайта для хренения настроек импорта
  3 class ImportSiteConfig extends SiteConfigDecorator {
  4     
  5     public static $sendEmail = false;
  6 
  7     function extraStatics() {
  8         return array(
  9             'db' => array(
 10                 'ImportMode' => "Enum('full, incremental')",
 11                 'ClearProducts' => 'Varchar',
 12                 'ClearCategory' => 'Varchar',
 13                 'StartPage' => 'Varchar(200)',
 14                 'SubSite' => 'Int',
 15                 'OldItemAction' => "Enum('hide, unpublish, delete')",
 16             ),
 17             'has_many' => array(
 18                 'Notifications' => 'Notification'
 19             )
 20         );
 21     }
 22     
 23     function updateCMSFields(& $fields) {
 24         $tab = self::get_config_tab($fields, 'Import');
 25         
 26         $tab->push(new DropdownField("StartPage", _t('ImportSiteConfig.StartPage', 'Start Page'), $this->getImportStartPageMap(), $this->owner->StartPage));
 27         if (class_exists('SubSite')) {
 28             $tab->push(new DropdownField("SubSite", _t('ImportSiteConfig.SubSite', 'Sub Site'), $this->getSubSiteMap(), $this->owner->SubSite));
 29         }
 30         $tab->push(new DropdownField('ImportMode', _t('ImportSiteConfig.ImportMode', 'Import Mode'), $this->getImportModeMap(), $this->owner->ImportMode));
 31         $tab->push(new DropdownField('ClearCategory', _t('ImportSiteConfig.ClearCategory', 'Clear Category'), $this->getYesNoMap(), $this->owner->ClearCategory));
 32         $tab->push(new DropdownField('ClearProducts', _t('ImportSiteConfig.ClearProducts', 'Clear Products'), $this->getYesNoMap(), $this->owner->ClearProducts));
 33         $tab->push(new DropdownField('OldItemAction', _t('ImportSiteConfig.OldItemAction', 'Old Item Action'), $this->getOldItemActionMap(), $this->owner->OldItemAction));
 34         ini_set('display_errors',1);
 35         // $fields->insertBefore(new Tab('Notifications', 'Уведомления об импорте'), 'Catalog');
 36         if(self::$sendEmail){
 37             $tab->push(new LiteralField('Notifications','<h3>Уведомления</h3>'));
 38             $notifications = new HasManyDataObjectManager(
 39                 $this->owner,
 40                 'Notifications',
 41                 'Notification',
 42                 null,
 43                 null
 44             );
 45             // $notifications->setParentClass('SiteConfig');
 46             // $notifications->setSourceID($this->owner->ID);
 47             $notifications->setPopupSize(800, 600);
 48             $notifications->setPageSize(30);
 49             $tab->push($notifications);
 50         }
 51     }
 52     
 53     function getYesNoMap() {
 54         $rs = array();
 55         $rs['false'] = _t('ImportSiteConfig.No', 'No');
 56         $rs['true'] = _t('ImportSiteConfig.Yes', 'Yes');
 57         return $rs;     
 58     }
 59     
 60     function getImportStartPageMap() {
 61         $data = array();
 62         $data['/'] =  _t('ImportSiteConfig.SiteRoot', 'Site Root');     
 63         foreach(ProductCatalogImportTask::get_possible_start_pages() as $pageType) {            
 64             $rs = DataObject::get($pageType);           
 65             if ($rs) {
 66                 foreach($rs as $entry) {
 67                     if ($entry->getAncestors()->Count() < 3) {
 68                         $str =  '';                 
 69                         for($i = 1; $i <= ($entry->getAncestors()->Count()); $i++) {
 70                             $str .= '-';                        
 71                         }
 72                         $data[$entry->URLSegment] = $str . $entry->MenuTitle;
 73                     }
 74                 }
 75             }
 76         }
 77         return $data;
 78     }
 79     
 80     function getSubSiteMap() {
 81         $data = array();
 82         $data[0] =  _t('ImportSiteConfig.SelectSubSite', 'Select Sub Site');
 83         if (class_exists('SubSite')) {
 84             $subsites = DataObject::get('SubSite');
 85             if ($subsites) {
 86                 $data = $subsites->map('ID', 'Title', _t('ImportSiteConfig.SelectSubSite', 'Sub Site'));
 87             }
 88         }
 89         return $data;
 90     }
 91 
 92     function getImportModeMap() {
 93         $rs = array();
 94         foreach($this->owner->dbObject('ImportMode')->enumValues() as $mode)
 95             $rs[$mode] = _t('ImportSiteConfig.Mode_' . $mode, $mode);
 96         return $rs;
 97         
 98     }
 99     
100     function getOldItemActionMap() {
101         $rs = array();
102         foreach($this->owner->dbObject('OldItemAction')->enumValues() as $mode)
103             $rs[$mode] = _t('ImportSiteConfig.OldItemAction_' . $mode, $mode);
104         return $rs;     
105     }
106     
107     function getLastProductCatalogDate() {
108         if ($log =  ProductImportLog::get_last_log(true)) {
109             return $log->ProductCatalogDate;
110         }
111         return false;
112     }
113 }
[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.2 API Docs API documentation generated by ApiGen 2.8.0