MINOR Removed references to outdated versions from docs

This commit is contained in:
Ingo Schommer 2012-03-09 21:34:05 +01:00
parent 01b24daace
commit 3a068a0d18
16 changed files with 12 additions and 84 deletions

View File

@ -31,8 +31,6 @@ These calls retrieve a `[api:FieldList]` for the area where you intend to work w
### For the CMS ### For the CMS
* Requirements: SilverStripe 2.3.*
:::php :::php
$fields = singleton('MyDataObject')->getCMSFields(); $fields = singleton('MyDataObject')->getCMSFields();
@ -42,24 +40,18 @@ These calls retrieve a `[api:FieldList]` for the area where you intend to work w
Used for simple frontend forms without relation editing or `[api:TabSet] behaviour. Uses `scaffoldFormFields()` by Used for simple frontend forms without relation editing or `[api:TabSet] behaviour. Uses `scaffoldFormFields()` by
default. To customize, either overload this method in your subclass, or extend it by `DataExtension->updateFormFields()`. default. To customize, either overload this method in your subclass, or extend it by `DataExtension->updateFormFields()`.
* Requirements: SilverStripe 2.3.*
:::php :::php
$fields = singleton('MyDataObject')->getFrontEndFields(); $fields = singleton('MyDataObject')->getFrontEndFields();
## Customizing Scaffolded Fields ## Customizing Scaffolded Fields
* Requirements: SilverStripe 2.3.*
This section covers how to enhance the default scaffolded form fields from above. It is particularly useful when used This section covers how to enhance the default scaffolded form fields from above. It is particularly useful when used
in conjunction with the `[api:ModelAdmin]` in the CMS to make relevant data administration interfaces. in conjunction with the `[api:ModelAdmin]` in the CMS to make relevant data administration interfaces.
### Searchable Fields ### Searchable Fields
* Requirements: SilverStripe 2.3.*
The `$searchable_fields` property uses a mixed array format that can be used to further customize your generated admin The `$searchable_fields` property uses a mixed array format that can be used to further customize your generated admin
system. The default is a set of array values listing the fields. system. The default is a set of array values listing the fields.
@ -140,8 +132,6 @@ To include relations (''$has_one'', `$has_many` and `$many_many`) in your search
### Summary Fields ### Summary Fields
* Requirements: SilverStripe 2.3.*
Summary fields can be used to show a quick overview of the data for a specific `[api:DataObject]` record. Most common use is Summary fields can be used to show a quick overview of the data for a specific `[api:DataObject]` record. Most common use is
their display as table columns, e.g. in the search results of a `[api:ModelAdmin]` CMS interface. their display as table columns, e.g. in the search results of a `[api:ModelAdmin]` CMS interface.

View File

@ -89,7 +89,7 @@ For output of an image tag with the image automatically resized to 80px width, y
$Image.SetWidth(80) // returns a image 80px wide, ratio kept the same $Image.SetWidth(80) // returns a image 80px wide, ratio kept the same
$Image.SetHeight(80) // returns a image 80px tall, ration kept the same $Image.SetHeight(80) // returns a image 80px tall, ration kept the same
$Image.SetSize(80,80) // returns a 80x80px padded image $Image.SetSize(80,80) // returns a 80x80px padded image
$Image.SetRatioSize(80,80) // **New in 2.4** returns an image scaled proportional, with its greatest diameter scaled to 80px $Image.SetRatioSize(80,80) // Returns an image scaled proportional, with its greatest diameter scaled to 80px
$Image.PaddedImage(80, 80) // Returns an 80x80 image. Unused space is padded white. No crop. No stretching $Image.PaddedImage(80, 80) // Returns an 80x80 image. Unused space is padded white. No crop. No stretching
$Image.Width // returns width of image $Image.Width // returns width of image
$Image.Height // returns height of image $Image.Height // returns height of image

View File

@ -2,7 +2,7 @@
## Introduction ## Introduction
Partial caching, new in SilverStripe 2.4, is a feature that allows the caching of just a portion of a page. Partial caching is a feature that allows the caching of just a portion of a page.
As opposed to static publishing, which avoids the SilverStripe controller layer on cached pages, partial caching allows As opposed to static publishing, which avoids the SilverStripe controller layer on cached pages, partial caching allows
caching for pages that contain a mix of moderately static & user specific data, and still provide full access control caching for pages that contain a mix of moderately static & user specific data, and still provide full access control
@ -54,7 +54,7 @@ From a block that shows a summary of the page edits if administrator, nothing if
## Aggregates ## Aggregates
Often you want to invalidate a cache when any in a set of objects change, or when the objects in a relationship change. Often you want to invalidate a cache when any in a set of objects change, or when the objects in a relationship change.
To help do this, SilverStripe 2.4 also introduces the concept of Aggregates. These calculate and return SQL aggregates To help do this, SilverStripe introduces the concept of Aggregates. These calculate and return SQL aggregates
on sets of `[api:DataObject]`s - the most useful for us being the Max aggregate. on sets of `[api:DataObject]`s - the most useful for us being the Max aggregate.
For example, if we have a menu, we want that menu to update whenever _any_ page is edited, but would like to cache it For example, if we have a menu, we want that menu to update whenever _any_ page is edited, but would like to cache it
@ -165,7 +165,7 @@ temporarily disable a particular cache block by changing just the tag, leaving t
## Nested cacheblocks ## Nested cacheblocks
New since 2.4 beta 2 is the ability to nest independent cache blocks (with one important rule, discussed later). You can also nest independent cache blocks (with one important rule, discussed later).
Any nested cache blocks are calculated independently from their containing block, regardless of the cached state of that Any nested cache blocks are calculated independently from their containing block, regardless of the cached state of that
container. container.

View File

@ -29,12 +29,6 @@ the templates
<% require themedCSS(TreeSelector) %> <% require themedCSS(TreeSelector) %>
<% require javascript(cms/javascript/LeftAndMain.js) %> <% require javascript(cms/javascript/LeftAndMain.js) %>
Note that currently (as of 2.3) you cannot pass a second parameter to a function via the template parser so doing the
following will not work.
<% require css(cms/css/TreeSelector.css, 'screen,projection') %>
## Combining Files ## Combining Files
You can concatenate several CSS or javascript files into a single dynamically generated file. This increases performance You can concatenate several CSS or javascript files into a single dynamically generated file. This increases performance

View File

@ -2,7 +2,7 @@
## Introduction ## Introduction
The `[api:SiteConfig]` panel was introduced in 2.4 for providing a generic interface for managing site wide settings or The `[api:SiteConfig]` panel provides a generic interface for managing site wide settings or
functionality which is used throughout the site. Out of the box it provides 2 fields 'Site Name' and 'Site Tagline'. functionality which is used throughout the site. Out of the box it provides 2 fields 'Site Name' and 'Site Tagline'.
## Accessing `[api:SiteConfig]` Options ## Accessing `[api:SiteConfig]` Options

View File

@ -32,24 +32,11 @@ might consist of more than one *URLSegment*).
## Nested/Hierarchical URLs ## Nested/Hierarchical URLs
In a nutshell, the nested URLs feature means that your site URLs now reflect the actual parent/child page structure of In a nutshell, the nested URLs feature means that your site URLs now reflect the actual parent/child page structure of
your site. In SilverStripe 2.3 and earlier, all page URLs would be on the top level, regardless of whether they were your site. The URLs map directly to the chain of parent and child pages. The
nested under other pages or not. In 2.4 however, the URLs now map directly to the chain of parent and child pages. The
below table shows a quick summary of what these changes mean for your site: below table shows a quick summary of what these changes mean for your site:
![url table](http://silverstripe.org/assets/screenshots/Nested-URLs-Table.png) ![url table](http://silverstripe.org/assets/screenshots/Nested-URLs-Table.png)
This feature is enabled by default in SilverStripe 2.4 or newer. To activate it for older sites, insert the following
code in your *mysite/_config.php*:
:::php
SiteTree::enable_nested_urls();
After activating nested URLs on an existing database, you'll have to run a migration task to rewrite internal URL
references in the *SiteTree.Content* field.
http://<yourdomain.tld>/dev/tasks/MigrateSiteTreeLinkingTask
## Limiting Children/Parent ## Limiting Children/Parent
By default, any page type can be the child of any other page type. However, there are 4 static properties that can be By default, any page type can be the child of any other page type. However, there are 4 static properties that can be

View File

@ -12,10 +12,6 @@ See [Partial-Caching](partial-caching) for a much more flexible way of building
content. Partial Caching is recommended as a basic enhancement to any SilverStripe site however if your site is planning content. Partial Caching is recommended as a basic enhancement to any SilverStripe site however if your site is planning
a vast amount of traffic (eg an article is being dug) then Static Publisher will be appropriate. a vast amount of traffic (eg an article is being dug) then Static Publisher will be appropriate.
## Requirements
*Requires SilverStripe 2.3*
## Usage ## Usage
SilverStripe doesn't have enough information about your template and data-structures to automatically determine which SilverStripe doesn't have enough information about your template and data-structures to automatically determine which
@ -123,8 +119,7 @@ Put this in mysite/_config.php. This will create static content in a "cache/" s
[View .htaccess [View .htaccess
example](http://open.silverstripe.com/browser/modules/cms/trunk/code/staticpublisher/htaccess_example_rsyncsingleserver) example](http://open.silverstripe.com/browser/modules/cms/trunk/code/staticpublisher/htaccess_example_rsyncsingleserver)
* **New for 2.4:** In 2.4, we use a simple PHP script, static-main.php, to control cache lookup. This make the * We use a simple PHP script, static-main.php, to control cache lookup. This makes the .htaccess update simpler.
.htaccess update simpler.
Just look for this line: Just look for this line:

View File

@ -211,7 +211,7 @@ The value that given in the `<% loop %>` tags should be a collection variable.
### Modulus and MultipleOf ### Modulus and MultipleOf
New in 2.4 you can use 2 new controls $Modulus and $MultipleOf to help build column layouts. $Modulus and $MultipleOf can help to build column layouts.
:::ss :::ss
$Modulus(value, offset) // returns an int $Modulus(value, offset) // returns an int

View File

@ -7,20 +7,6 @@ The Versioned class is a `[api:DataObject]` that adds versioning and staging cap
Sometimes, you'll want to do something whenever a particular kind of page is published. This example sends an email Sometimes, you'll want to do something whenever a particular kind of page is published. This example sends an email
whenever a blog entry has been published. whenever a blog entry has been published.
*SilverStripe 2.3*
:::php
class Page extends SiteTree {
// ...
public function publish($fromStage, $toStage, $createNewVersion = false) {
mail("sam@silverstripe.com", "Blog published", "The blog has been published");
return $this->extension_instances['Versioned']->publish($fromStage, $toStage, $createNewVersion);
}
}
*SilverStripe 2.4*
:::php :::php
class Page extends SiteTree { class Page extends SiteTree {
// ... // ...

View File

@ -105,7 +105,7 @@ The Debug class contains a number of static methods
* *Debug::show($myVariable)*: performs a kind of *print_r($myVariable)*, but shows it in a more useful format. * *Debug::show($myVariable)*: performs a kind of *print_r($myVariable)*, but shows it in a more useful format.
* *Debug::message("Wow, that's great")*: prints a short debugging message. * *Debug::message("Wow, that's great")*: prints a short debugging message.
* *SS_Backtrace::backtrace()* (2.3: *Debug::backtrace()*): prints a calls-stack * *SS_Backtrace::backtrace()*: prints a calls-stack
* *Debug::send_errors_to("sam@silverstripe.com")*: All errors will get sent to this address. * *Debug::send_errors_to("sam@silverstripe.com")*: All errors will get sent to this address.
### Error handling ### Error handling

View File

@ -33,8 +33,6 @@ The default HTML template is located in `sapphire/templates/email/GenericEmail.s
### Templates ### Templates
**Requirements: SilverStripe 2.3+**
* Create a SS-template file called, in this example we will use 'MyEmail.ss' inside `mysite/templates/email`. * Create a SS-template file called, in this example we will use 'MyEmail.ss' inside `mysite/templates/email`.
* Fill this out with the body text for your email. You can use any [SS-template syntax](/topics/templates) (e.g. `<% control %>`, * Fill this out with the body text for your email. You can use any [SS-template syntax](/topics/templates) (e.g. `<% control %>`,
`<% if %>`, $FirstName etc) `<% if %>`, $FirstName etc)

View File

@ -50,7 +50,6 @@ content. This means that database access isn't required to provide a 500 error
### From SilverStripe ### From SilverStripe
*Requires SilverStripe 2.3*
You can indicate a log file relative to the site root. The named file will have a terse log sent to it, and the full log You can indicate a log file relative to the site root. The named file will have a terse log sent to it, and the full log
(an encoded file containing backtraces and things) will go to a file of a similar name, but with the suffix ".full" (an encoded file containing backtraces and things) will go to a file of a similar name, but with the suffix ".full"
added. added.
@ -63,15 +62,6 @@ added.
// or just errors // or just errors
SS_Log::add_writer(new SS_LogFileWriter('/my/logfile/path'), SS_Log::ERR); SS_Log::add_writer(new SS_LogFileWriter('/my/logfile/path'), SS_Log::ERR);
#### Deprecated method (SS 2.3 ?)
`<mysite>/_config.php`:
:::php
Debug::log_errors_to("/my/logfile/path");
### From PHP ### From PHP
In addition to SilverStripe-integrated logging, it is adviseable to fall back to PHPs native logging functionality. A In addition to SilverStripe-integrated logging, it is adviseable to fall back to PHPs native logging functionality. A
@ -95,12 +85,4 @@ You can send both fatal errors and warnings in your code to a specified email-ad
// log errors and warnings // log errors and warnings
SS_Log::add_writer(new SS_LogEmailWriter('admin@domain.com'), SS_Log::WARN, '<='); SS_Log::add_writer(new SS_LogEmailWriter('admin@domain.com'), SS_Log::WARN, '<=');
// or just errors // or just errors
SS_Log::add_writer(new SS_LogEmailWriter('admin@domain.com'), SS_Log::ERR); SS_Log::add_writer(new SS_LogEmailWriter('admin@domain.com'), SS_Log::ERR);
### Deprecated method (SS 2.3 ?)
:::php
Debug::send_errors_to("developer@example.org");
Debug::send_warnings_to("developer@example.org"); // Optional, implied by send_errors_to()

View File

@ -282,8 +282,6 @@ Translation table: sapphire/lang/de_DE.php (extract)
## Javascript Usage ## Javascript Usage
*Requires SilverStripe 2.3*
i18n in javascript works with mostly the same assumption as its PHP-equivalent. i18n in javascript works with mostly the same assumption as its PHP-equivalent.

View File

@ -226,8 +226,6 @@ This returns the value inputted in the CMS, if it's set or what is in the $title
### Forms within Widgets ### Forms within Widgets
**Requires SilverStripe 2.4 or newer**
To implement a form inside a widget, you need to implement a custom controller for your widget to return this form. Make To implement a form inside a widget, you need to implement a custom controller for your widget to return this form. Make
sure that your controller follows the usual naming conventions, and it will be automatically picked up by the sure that your controller follows the usual naming conventions, and it will be automatically picked up by the
`[api:WidgetArea]` rendering in your *Page.ss* template. `[api:WidgetArea]` rendering in your *Page.ss* template.

View File

@ -381,7 +381,7 @@ class DataQuery {
/** /**
* Add a join clause to this query * Add a join clause to this query
* @deprecated Use innerJoin() or leftJoin() instead. * @deprecated 3.0 Use innerJoin() or leftJoin() instead.
*/ */
function join($join) { function join($join) {
Deprecation::notice('3.0', 'Use innerJoin() or leftJoin() instead.'); Deprecation::notice('3.0', 'Use innerJoin() or leftJoin() instead.');

View File

@ -6,7 +6,7 @@
/** /**
* Uses a substring match against content in column rows. * Uses a substring match against content in column rows.
* @deprecated Use PartialMatchFilter instead * @deprecated 3.0 Use PartialMatchFilter instead
* *
* @package sapphire * @package sapphire
* @subpackage search * @subpackage search