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 /**
  4  * Просмотр логов
  5  *
  6  * @author inxo, dvp, kozin
  7  */
  8 class LoggerAdmin extends ModelAdmin {
  9 
 10     static $url_segment = 'logs';
 11     static $url_rule = '/$Action';
 12     public static $allowed_actions = array(
 13         'handleList',
 14         'handleItem',
 15     );
 16     public static $managed_models = array(
 17         'LogItem'
 18     );
 19     static $menu_title = 'Журнал';
 20     public static $collection_controller_class = "LoggerAdmin_CollectionController";
 21     public static $record_controller_class = "LoggerAdmin_RecordController";
 22 
 23 }
 24 
 25 class LoggerAdmin_CollectionController extends ModelAdmin_CollectionController {
 26 
 27     public function ImportForm() {
 28         return false;
 29     }
 30 
 31     public function CreateForm() {
 32         return false;
 33     }
 34 
 35     function getResultsTable($searchCriteria) {
 36 
 37         $summaryFields = $this->getResultColumns($searchCriteria);
 38         $className = $this->parentController->resultsTableClassName();
 39         $tf = new $className(
 40                         $this->modelClass,
 41                         $this->modelClass,
 42                         $summaryFields
 43         );
 44 
 45         $query = $this->getSearchQuery($searchCriteria);
 46         if ($searchCriteria['DateFrom'] != '')
 47             $query->where('LastEdited >= \'' . Convert::raw2sql(join('-', array_reverse(explode('.', $searchCriteria['DateFrom'])))) . ' 00:00:00\'');
 48         if ($searchCriteria['DateTo'] != '')
 49             $query->where('LastEdited <= \'' . Convert::raw2sql(join('-', array_reverse(explode('.', $searchCriteria['DateTo'])))) . ' 23:59:59\'');
 50         $tf->setCustomQuery($query);
 51 
 52 
 53         $tf->setPageSize($this->parentController->stat('page_length'));
 54         $tf->setShowPagination(true);
 55         // @todo Remove records that can't be viewed by the current user
 56         $tf->setPermissions(array_merge(array('view'), array()));       
 57         return $tf;
 58     }
 59 
 60     public function SearchForm() {
 61         $context = singleton($this->modelClass)->getDefaultSearchContext();
 62         $fields = $context->getSearchFields();
 63 
 64         //Поле Класс
 65         $fields->removeByName('Class');
 66         $all_loged_classes = DB::Query("select distinct Class from LogItem order by Class")->column('Class');
 67         $RU_all_loged_classes = array();
 68         foreach($all_loged_classes as $loged_class) {
 69             if ($loged_class)
 70                 $RU_all_loged_classes[$loged_class] = LogItem::get_class_name($loged_class);
 71         }
 72         asort($RU_all_loged_classes);
 73         $fields->insertBefore(
 74             new DropdownField(
 75                 'Class', 
 76                 _t('LogItem.ClassTitle', 'Object Class'), 
 77                 $RU_all_loged_classes,
 78                 '',
 79                 null,
 80                 _t('LoggerAdmin.ANYCLASS', 'Any Class')
 81             ), 
 82             'ItemID'
 83         );
 84         
 85         //Поле MemberID
 86         $fields->removeByName('MemberID');
 87         $all_loged_user_ids = DB::Query("select distinct MemberID from LogItem")->column('MemberID');
 88         $all_loged_users = array();
 89         foreach($all_loged_user_ids as $loged_user_id) {
 90             $all_loged_users[$loged_user_id] = LogItem::get_member_name($loged_user_id);
 91         }
 92         asort($all_loged_users);
 93         $fields->push(new DropdownField('MemberID', _t('LogItem.MemberTitle', 'Member'), $all_loged_users, '', null, _t('LoggerAdmin.ANYMEMBER', 'Any Member')));
 94         
 95         $dateField = new DateField('DateFrom', _t('LoggerAdmin.FROM', 'From'), date('Y-m-d', strtotime('now -1 month')));
 96         $dateField->setConfig('html5', true);
 97         $dateField->setConfig('max', date('Y-m-d', strtotime('now')));
 98         $fields->push($dateField);
 99 
100         $dateFieldTo = new DateField('DateTo', _t('LoggerAdmin.TO', 'To'), date('Y-m-d', strtotime('now')));
101         $dateFieldTo->setConfig('html5', true);
102         $dateFieldTo->setConfig('max', date('Y-m-d', strtotime('now')));
103         $fields->push($dateFieldTo);
104 
105         $statusValues = singleton('LogItem')->dbObject('Action')->enumValues();
106         foreach ($statusValues as $statusName => $statusItem) {
107             $statusValues[$statusName] = _t('Logs.Action' . $statusItem);
108         }
109         asort($statusValues);
110 
111         $fields->replaceField(
112             'Action',
113             new DropdownField('Action', _t('Logs.Action', 'Action'), $statusValues, '', null, _t('Logs.ActionAny', 'Any'))
114         );
115 
116         $columnSelectionField = $this->ColumnSelectionField();
117         $fields->push($columnSelectionField);
118         $validator = new RequiredFields();
119         $validator->setJavascriptValidationHandler('none');
120 
121         $form = new Form($this, "SearchForm",
122                         $fields,
123                         new FieldSet(
124                                 new FormAction('search', _t('MemberTableField.SEARCH', 'Search')),
125                                 $clearAction = new ResetFormAction('clearsearch', _t('ModelAdmin.CLEAR_SEARCH', 'Clear Search'))
126                         ),
127                         $validator
128         );
129         //$form->setFormAction(Controller::join_links($this->Link(), "search"));
130         $form->setFormMethod('get');
131         $form->setHTMLID("Form_SearchForm_" . $this->modelClass);
132         $form->disableSecurityToken();
133         $clearAction->useButtonTag = true;
134         $clearAction->addExtraClass('minorAction');
135 
136         return $form;
137     }
138     
139 
140 }
141 
142 class LoggerAdmin_RecordController extends ModelAdmin_RecordController {
143 
144     static $allowed_actions = array('view', 'ViewForm');
145 
146 }
[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