SilverStripe 2.4 API Docs
  • Package
  • Class
  • Tree
  • Deprecated
Version: master
  • master
  • 3.1
  • 3.0
  • 2.4
  • tagfield

Packages

  • cms
    • assets
    • batchaction
    • batchactions
    • bulkloading
    • comments
    • content
    • core
    • export
    • publishers
    • reports
    • security
    • tasks
  • forms
    • actions
    • core
    • fields-basic
    • fields-dataless
    • fields-datetime
    • fields-files
    • fields-formatted
    • fields-formattedinput
    • fields-relational
    • fields-structural
    • transformations
    • validators
  • installer
  • None
  • PHP
  • 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

Classes

  • ArrayData
  • Requirements
  • Requirements_Backend
  • SSViewer
  • SSViewer_Cached_PartialParser
  • SSViewer_FromString
  • SSViewer_PartialParser
  • ViewableData
  • ViewableData_Customised
  • ViewableData_Debugger

Class ArrayData

Lets you wrap a bunch of array data into a ViewableData object.

new ArrayData(array(
   "ClassName" => "Page",
   "AddAction" => "Add a new Page page",
));
Object
Extended by ViewableData implements IteratorAggregate
Extended by ArrayData
Package: sapphire\view
Located at sapphire/core/ArrayData.php

Methods summary

public
# __construct( object|array $array )

Parameters

$array
object|array
$array Either an object with simple properties or an associative array. Converts object-properties to indices of an associative array.

Overrides

Object::__construct
public array
# getArray( )

Get the source array

Get the source array

Returns

array
public mixed
# getField( string $f )

Get a value from a given field

Get a value from a given field

Parameters

$f
string
$f field key

Returns

mixed

Overrides

ViewableData::getField
public
# setField( string $field, mixed $value )

Add or set a field on this object.

Add or set a field on this object.

Parameters

$field
string
$field
$value
mixed
$value

Overrides

ViewableData::setField
public boolean
# hasField( string $f )

Check array to see if field isset

Check array to see if field isset

Parameters

$f
string
Field Key

Returns

boolean

Overrides

ViewableData::hasField
protected static array
# object_to_array( ViewableData::obj() $obj )

Converts an object with simple properties to an associative array.

Converts an object with simple properties to an associative array.

Parameters

$obj
ViewableData::obj()
$obj

Returns

array
public
# forTemplate( )

This is pretty crude, but it helps diagnose error situations

This is pretty crude, but it helps diagnose error situations

Methods inherited from ViewableData

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

Methods inherited from Object

__call(), __toString(), addMethodsFrom(), addStaticVars(), addWrapperMethod(), add_extension(), add_static_var(), allMethodNames(), cacheToFile(), cacheToFileWithArgs(), clearCache(), combined_static(), create(), createMethod(), create_from_string(), exists(), 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

protected array $array
#

See

ArrayData::_construct()

Properties inherited from ViewableData

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

Properties inherited from Object

$class, $extension_instances, $extensions

Comments

Comment policy: Please use comments for tips and corrections about the described functionality. Comments are moderated, we reserve the right to remove comments that are inappropriate or are no longer relevant.
Use the Silverstripe Forum to ask questions.
blog comments powered by Disqus
SilverStripe 2.4 API Docs API documentation generated by ApiGen 2.8.0