Update extend cms docs to include 3.0 API change.

This commit is contained in:
Will Rossiter 2012-07-15 17:23:10 +12:00
parent bf91594e4f
commit aa76aca10d

View File

@ -85,9 +85,9 @@ Create a new file called `zzz_admin/code/BookmarkedPageExtension.php` and insert
:::php :::php
<?php <?php
class BookmarkedPageExtension extends DataExtension { class BookmarkedPageExtension extends DataExtension {
static $db = array('IsBookmarked' => 'Boolean'); public static $db = array('IsBookmarked' => 'Boolean');
public function updateCMSFields(&$fields) { public function updateCMSFields(FieldList $fields) {
$fields->addFieldToTab('Root.Main', $fields->addFieldToTab('Root.Main',
new CheckboxField('IsBookmarked', "Show in CMS bookmarks?") new CheckboxField('IsBookmarked', "Show in CMS bookmarks?")
); );