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

  • Catalog
  • CatalogAdmin
  • CatalogCMSActionDecorator
  • CatalogMemberDecorator
  • CatalogPrice
  • CMSSiteTreeFilter_Catalog
  • Monument
  • MonumentCatalog
  • MonumentForm
  • Orders1CExchange_SiteConfig
  • PaymentType
  • Product
  • ProductCatalogSiteConfig
  • ProductSearchPage
  • SimpleOrderButton
  • SimpleOrderData
  • SimpleOrderForm
  • SimpleOrderPage
  • StartCatalog
  • VirtualProduct

Interfaces

  • OrderButtonInterface
 1 <?php
 2 
 3 /**
 4  * Сохранение в пользователе настроек отображения каталога
 5  *
 6  * @package Catalog
 7  * @author dvp, menedem
 8  */
 9 class CatalogMemberDecorator extends DataObjectDecorator {
10     function extraStatics() {
11         return array(
12             'db' => array(
13                 'CatalogOptions' => 'Varchar(255)',
14             )
15         );
16     }
17 
18     /**
19      * Получить настройку каталога
20      * 
21      * @param string $name - имя параметра
22      * 
23      * @return mixed - сохраненное значение
24      */
25     function getCatalogOption($name) {
26         $options = @unserialize($this->owner->CatalogOptions);
27         if (!$options || !is_array($options) || !isset($options[$name]))
28             return;
29         return $options[$name];
30     }
31     
32     /**
33      * Сохранить настройку каталога
34      * 
35      * @param string $name - имя параметра
36      * @param mixed $val - значение параметра
37      */
38     function setCatalogOption($name, $val) {
39         $options = @unserialize($this->owner->CatalogOptions);
40         if (!$options || !is_array($options))
41             $options = array();
42         $options[$name] = $val;
43         $this->owner->CatalogOptions = serialize($options);
44         if ($this->owner->isChanged('CatalogOptions'))
45             $this->owner->write();
46     }
47 }
[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