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

  • AdditionalMenuWidget_Item
  • AdvancedSliderHomepageWidget_Item
  • AssetManagerFolder
  • BannerWidget_Item
  • BaseObjectDecorator
  • BookingOrder
  • BookingPaymentMethod
  • BookingService
  • Boolean
  • ButtonsBlockHomepageWidget_Item
  • CarouselHomepageWidget_Item
  • CatalogRubricsHomepageWidget_CatalogDecorator
  • ClientEmailOrderNotification
  • ClientVKOrderNotification
  • ComponentSet
  • Currency
  • DatabaseAdmin
  • DataObject
  • DataObjectDecorator
  • DataObjectLog
  • DataObjectSet
  • DataObjectSet_Iterator
  • Date
  • DB
  • DBField
  • Decimal
  • DocumentItem
  • DocumentPage_File
  • Double
  • Enum
  • ErrorPageSubsite
  • FileDataObjectTrackingDecorator
  • FileImportDecorator
  • Float
  • ForeignKey
  • Hierarchy
  • HTMLText
  • HTMLVarchar
  • ImportLog_Item
  • Int
  • ManagerEmailOrderNotification
  • Material3D_File
  • MediawebPage_File
  • MediawebPage_Photo
  • MobileContentDecorator
  • Money
  • MultiEnum
  • MySQLDatabase
  • MySQLQuery
  • OrderDataObject
  • OrderHandlersDecorator
  • OrderItemVariationDecorator
  • OrderService
  • OrderServiceOrder
  • OrdersExportDecorator
  • PageIcon
  • PageWidgets
  • Payment
  • PaymentMethodShippingDecorator
  • PaymentOrderExtension
  • Percentage
  • PhotoAlbumItem
  • PhotoAlbumProductLinkDecorator
  • PhotoAlbumWidgetLinkDecorator
  • PhotoGalleryHomepageWidget_Item
  • PrimaryKey
  • Product3DDecorator
  • ProductCatalogCatalogLinkedDecorator
  • RatePeriod
  • RealtyImportLog
  • RealtyImportLog_Item
  • RedirectEntry
  • RoomOrder
  • RoomOrderPerson
  • RoomRate
  • RoomService
  • RoomServiceOrder
  • SberbankPaymentDecorator
  • SeoOpenGraphPageDecorator
  • ServiceOrder
  • ShippingMethodPaymentDecorator
  • ShopCountry
  • SimpleOrderCatalogDecorator
  • SimpleOrderProductDecorator
  • SiteConfigWidgets
  • SiteTreeDecorator
  • SiteTreeImportDecorator
  • SliderHomepageWidget_Item
  • SMSCOrderNotification
  • SMSOrderNotification
  • SortableDataObject
  • SQLMap
  • SQLMap_Iterator
  • SQLQuery
  • SS_Database
  • SS_Datetime
  • SS_Query
  • StringField
  • SubsiteDomain
  • Text
  • TextAnonsWidget_Item
  • Texture3D_File
  • Time
  • Varchar
  • Versioned
  • Versioned_Version
  • VideoCategory
  • VideoEntry
  • VKNotificationQueue
  • WebylonWidget_Item
  • YaMoneyPaymentDecorator
  • Year

Interfaces

  • CompositeDBField
  • CurrentPageIdentifier
  • DataObjectInterface

Class RoomService

A single database record & abstract class for the data-access-model.

Extensions and Decorators

See Extension and DataObjectDecorator.

Permission Control

Object-level access control by Permission. Permission codes are arbitrary strings which can be selected on a group-by-group basis.

class Article extends DataObject implements PermissionProvider {
        static $api_access = true;

        public function canView($member = false) {
                return Permission::check('ARTICLE_VIEW');
        }
        public function canEdit($member = false) {
                return Permission::check('ARTICLE_EDIT');
        }
        public function canDelete() {
                return Permission::check('ARTICLE_DELETE');
        }
        public function canCreate() {
                return Permission::check('ARTICLE_CREATE');
        }
        public function providePermissions() {
                return array(
                        'ARTICLE_VIEW' => 'Read an article object',
                        'ARTICLE_EDIT' => 'Edit an article object',
                        'ARTICLE_DELETE' => 'Delete an article object',
                        'ARTICLE_CREATE' => 'Create an article object',
                );
        }
}

Object-level access control by Group membership:

class Article extends DataObject {
        static $api_access = true;

        public function canView($member = false) {
                if(!$member) $member = Member::currentUser();
        return $member->inGroup('Subscribers');
        }
        public function canEdit($member = false) {
                if(!$member) $member = Member::currentUser();
        return $member->inGroup('Editors');
        }

        // ...
}

If any public method on this class is prefixed with an underscore, the results are cached in memory through ViewableData::cachedCall().

Object
Extended by ViewableData implements IteratorAggregate
Extended by DataObject implements DataObjectInterface, i18nEntityProvider
Extended by BookingService
Extended by RoomService
Package: sapphire\model
Located at booking/code/RoomService.php

Methods summary

public static
# get_active( )
public FieldSet
# getCMSFields( )

Centerpiece of every data administration interface in Silverstripe, which returns a FieldSet suitable for a Form object. If not overloaded, we're using DataObject::scaffoldFormFields() to automatically generate this set. To customize, overload this method in a subclass or decorate onto it by using DataObjectDecorator->updateCMSFields().

Centerpiece of every data administration interface in Silverstripe, which returns a FieldSet suitable for a Form object. If not overloaded, we're using DataObject::scaffoldFormFields() to automatically generate this set. To customize, overload this method in a subclass or decorate onto it by using DataObjectDecorator->updateCMSFields().

klass MyCustomClass extends DataObject {
        static $db = array('CustomProperty'=>'Boolean');

        public function getCMSFields() {
                $fields = parent::getCMSFields();
                $fields->addFieldToTab('Root.Content',new CheckboxField('CustomProperty'));
        return $fields;
}
}

Returns

FieldSet
Returns a TabSet for usage within the CMS - don't use for frontend forms.

See

Good example of complex FormField building: SiteTree::getCMSFields()

Overrides

BookingService::getCMSFields
public <type>
# HTML( <type> $order, mixed $value = 0 )

Parameters

$order
<type> $rate
$value

Returns

<type>
<type>

Methods inherited from BookingService

ActiveTitle(), Cost(), fieldLabels(), getServiceSelector(), onBeforeWrite()

Methods inherited from DataObject

Aggregate(), RelationshipAggregate(), __construct(), baseTable(), belongs_to(), buildDataObjectSet(), buildSQL(), can(), canCreate(), canDelete(), canEdit(), canView(), castedUpdate(), composite_fields(), context_obj(), customDatabaseFields(), custom_database_fields(), data(), databaseFields(), databaseIndexes(), database_extensions(), database_fields(), db(), dbObject(), debug(), defaultSearchFilters(), defineMethods(), delete(), delete_by_id(), destroy(), disableCMSFieldsExtensions(), disable_subclass_access(), duplicate(), enableCMSFieldsExtensions(), enable_subclass_access(), exists(), extendedSQL(), fieldLabel(), flushCache(), flush_and_destroy_cache(), forceChange(), get(), getAllFields(), getCMSActions(), getChangedFields(), getClassAncestry(), getComponent(), getComponents(), getComponentsQuery(), getDefaultSearchContext(), getField(), getFrontEndFields(), getManyManyComponents(), getManyManyComponentsQuery(), getManyManyFilter(), getManyManyJoin(), getRemoteJoinField(), getReverseAssociation(), getTitle(), get_by_id(), get_one(), get_validation_enabled(), hasDatabaseField(), hasField(), hasOwnTableDatabaseField(), hasValue(), has_many(), has_one(), has_own_table(), i18n_plural_name(), i18n_singular_name(), inheritedDatabaseFields(), instance_get(), instance_get_one(), isChanged(), isEmpty(), isInDB(), is_composite_field(), many_many(), many_many_extraFields(), merge(), newClassInstance(), onAfterDelete(), onAfterWrite(), onBeforeDelete(), plural_name(), populateDefaults(), provideI18nEntities(), relObject(), requireDefaultRecords(), requireTable(), reset(), scaffoldFormFields(), scaffoldSearchFields(), searchableFields(), setCastedField(), setClassName(), setComponent(), setField(), set_context_obj(), set_validation_enabled(), singular_name(), summaryFields(), toMap(), update(), validate(), write(), writeComponents(), writeWithoutVersion()

Methods inherited from ViewableData

ATT_val(), BaseHref(), CSSClasses(), ColumnBreak(), ColumnCalc(), ColumnNumber(), ColumnPad(), ColumnPos(), CurrentMember(), CurrentPage(), Debug(), Even(), EvenOdd(), First(), FirstLast(), HasPerm(), IsAjax(), JS_val(), Last(), Me(), Middle(), MiddleString(), Modulus(), MultipleOf(), Odd(), Pos(), RAW_val(), SQL_val(), ThemeDir(), ThemeName(), Top(), TotalItems(), XML_val(), __get(), __isset(), __set(), buildCastingCache(), cachedCall(), castingClass(), castingHelper(), castingHelperPair(), castingObjectCreator(), castingObjectCreatorPair(), customise(), escapeTypeForField(), getIterator(), getSecurityID(), getXMLValues(), i18nLocale(), iteratorProperties(), obj(), renderWith(), setCustomisedObj()

Methods inherited from Object

__call(), __toString(), __wakeup(), addMethodsFrom(), addStaticVars(), addWrapperMethod(), add_extension(), add_static_var(), allMethodNames(), cacheToFile(), cacheToFileWithArgs(), clearCache(), combined_static(), create(), createMethod(), create_from_string(), extInstance(), extend(), getCustomClass(), getExtensionInstance(), getExtensionInstances(), get_extensions(), get_static(), hasExtension(), hasMethod(), has_extension(), invokeWithExtensions(), is_a(), loadCache(), parentClass(), parse_class_spec(), remove_extension(), sanitiseCachename(), saveCache(), set_stat(), set_static(), set_uninherited(), stat(), strong_create(), uninherited(), uninherited_static(), useCustomClass()

Magic methods summary

Properties summary

public static array $belongs_many_many
#

The inverse side of a many-many relationship. This is a map from component name to data type.

The inverse side of a many-many relationship. This is a map from component name to data type.

Properties inherited from BookingService

$db, $has_one, $searchable_fields, $summary_fields

Properties inherited from DataObject

$allowed_actions, $ancestry, $api_access, $belongs_to, $brokenOnDelete, $brokenOnWrite, $cache_get_one, $cache_has_own_table, $cache_has_own_table_field, $casting, $componentCache, $components, $create_table_options, $default_records, $default_sort, $defaults, $destroyed, $field_labels, $has_many, $indexes, $many_many, $many_many_extraFields, $original, $plural_name, $record, $singular_name

Properties inherited from ViewableData

$customisedObject, $default_cast, $failover, $iteratorPos, $iteratorTotalItems

Properties inherited from Object

$class, $extension_instances, $extensions

[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