From d633cad9ecca0aaca354db6dfa2da90da0f7af19 Mon Sep 17 00:00:00 2001 From: David Alexander Date: Tue, 9 Feb 2016 14:52:11 -0700 Subject: [PATCH] reactivate api: links added deleted link back in updated some external links --- docs/en/changelogs/2.2.0.md | 4 +- docs/en/changelogs/2.4.0.md | 4 +- docs/en/changelogs/2.4.3.md | 8 +- docs/en/howto/cache-control.md | 8 +- docs/en/howto/csv-import.md | 4 +- docs/en/howto/dynamic-default-fields.md | 4 +- docs/en/howto/grouping-dataobjectsets.md | 12 +-- docs/en/howto/index.md | 3 - docs/en/howto/phpunit-configuration.md | 4 +- docs/en/index.md | 14 +-- docs/en/installation/common-problems.md | 2 +- docs/en/installation/mac-osx.md | 4 +- docs/en/installation/windows-manual-iis-6.md | 2 +- docs/en/installation/windows-pi.md | 2 +- docs/en/misc/contributing.md | 6 +- docs/en/reference/advanced-templates.md | 18 ++-- docs/en/reference/built-in-page-controls.md | 8 +- docs/en/reference/complextablefield.md | 24 ++--- docs/en/reference/database-structure.md | 26 +++--- docs/en/reference/dataobject.md | 26 +++--- docs/en/reference/dataobjectdecorator.md | 29 +++--- docs/en/reference/dataobjectset.md | 14 +-- docs/en/reference/director.md | 12 +-- docs/en/reference/execution-pipeline.md | 12 +-- docs/en/reference/form-field-types.md | 88 +++++++++---------- docs/en/reference/image.md | 12 +-- docs/en/reference/leftandmain.md | 16 ++-- docs/en/reference/member.md | 28 +++--- docs/en/reference/modeladmin.md | 18 ++-- docs/en/reference/partial-caching.md | 4 +- docs/en/reference/permission.md | 4 +- docs/en/reference/requirements.md | 10 +-- docs/en/reference/restfulservice.md | 14 +-- docs/en/reference/rssfeed.md | 14 +-- docs/en/reference/searchcontext.md | 20 ++--- docs/en/reference/site-reports.md | 2 +- docs/en/reference/siteconfig.md | 14 +-- docs/en/reference/sitetree.md | 8 +- docs/en/reference/sqlquery.md | 22 ++--- docs/en/reference/staticpublisher.md | 8 +- docs/en/reference/tablefield.md | 22 ++--- docs/en/reference/tablelistfield.md | 20 ++--- docs/en/reference/typography.md | 4 +- docs/en/reference/urlvariabletools.md | 2 +- docs/en/reference/versioned.md | 2 +- docs/en/topics/access-control.md | 12 +-- docs/en/topics/configuration.md | 8 +- docs/en/topics/controller.md | 10 +-- docs/en/topics/data-types.md | 32 +++---- docs/en/topics/datamodel.md | 22 ++--- docs/en/topics/debugging.md | 4 +- docs/en/topics/directory-structure.md | 2 +- docs/en/topics/email.md | 2 +- docs/en/topics/error-handling.md | 4 +- docs/en/topics/extending-the-cms.md | 4 +- docs/en/topics/form-validation.md | 6 +- docs/en/topics/forms.md | 32 +++---- docs/en/topics/i18n.md | 6 +- docs/en/topics/javascript.md | 8 +- docs/en/topics/modules.md | 6 +- docs/en/topics/page-types.md | 6 +- docs/en/topics/search.md | 18 ++-- docs/en/topics/security.md | 16 ++-- .../topics/testing/create-functional-test.md | 6 +- .../en/topics/testing/create-sapphire-test.md | 8 +- docs/en/topics/testing/email-sending.md | 2 +- docs/en/topics/testing/index.md | 4 +- docs/en/topics/theme-development.md | 2 +- docs/en/topics/translation.md | 28 +++--- docs/en/topics/widgets.md | 4 +- docs/en/tutorials/building-a-basic-site.md | 4 +- docs/en/tutorials/extending-a-basic-site.md | 34 +++---- docs/en/tutorials/forms.md | 28 +++--- docs/en/tutorials/site-search.md | 4 +- 74 files changed, 451 insertions(+), 453 deletions(-) diff --git a/docs/en/changelogs/2.2.0.md b/docs/en/changelogs/2.2.0.md index 692a40c78..2e3dc3584 100644 --- a/docs/en/changelogs/2.2.0.md +++ b/docs/en/changelogs/2.2.0.md @@ -144,8 +144,8 @@ Sitemap.php * PHP OpenID (http://openidenabled.com/php-openid/) * Browscap (http://browscap.org/) * Plotr (http://www.solutoire.com/plotr/) - * SWFUpload (http://profandesign.se/swfupload/) - * Improved classes + * `SWFUpload (http://profandesign.se/swfupload/)` +* Improved classes * CalendarDateField * Refactored part of Field() into HTMLField() so it can be used in PopupDateTimeField * ComplexTableField diff --git a/docs/en/changelogs/2.4.0.md b/docs/en/changelogs/2.4.0.md index ca59b06e8..c8b73604d 100644 --- a/docs/en/changelogs/2.4.0.md +++ b/docs/en/changelogs/2.4.0.md @@ -217,8 +217,8 @@ Right: ### HTMLEditorField (TinyMCE) stores content as UTF8 instead of HTML Entities -Prior to 2.4.0, the TinyMCE JavaScript library would store a subset of special characters as HTML entities (see [TinyMCE -Configuration](http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/entities)). SilverStripe expects UTF8 for user +Prior to 2.4.0, the TinyMCE JavaScript library would store a subset of special characters as HTML entities (see `[TinyMCE +Configuration](http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/entities)`). SilverStripe expects UTF8 for user input in the CMS, database storage as well as output. We have made this behaviour more consistent by converting the TinyMCE entities back into UTF8 for database storage. diff --git a/docs/en/changelogs/2.4.3.md b/docs/en/changelogs/2.4.3.md index e709d23cc..44adbe0ac 100644 --- a/docs/en/changelogs/2.4.3.md +++ b/docs/en/changelogs/2.4.3.md @@ -145,7 +145,7 @@ Affected classes and methods: ### Usage of Controller::join_links() to concatenate links now mandatory -The `[api:Controller::join_links()]` method +The [api:Controller::join_links()] method to create links within SilverStripe controllers is now mandatory. This method ensures that links with existing GET parameters don't break through string concatenation. @@ -177,9 +177,9 @@ Full controller example: Using this method is particularly important for any custom -`[api:TableListField]` or -`[api:ComplexTableField]` subclasses and any -`[api:LeftAndMain]` subclass for the CMS UI. These classes in +[api:TableListField] or +[api:ComplexTableField] subclasses and any +[api:LeftAndMain] subclass for the CMS UI. These classes in particular were refactored to secure destructive links against Cross Site Request Forgery (CSRF). This is achieved via a mandatory "SecurityID" GET parameter appended to the base link. diff --git a/docs/en/howto/cache-control.md b/docs/en/howto/cache-control.md index a33f02293..812e97905 100644 --- a/docs/en/howto/cache-control.md +++ b/docs/en/howto/cache-control.md @@ -15,11 +15,11 @@ Default setting: Overriding these defaults - * `[api:HTTP::set_cache_age()]` can be used to set the max-age component of the cache-control line, in seconds. + * [api:HTTP::set_cache_age()] can be used to set the max-age component of the cache-control line, in seconds. Set it to 0 to disable caching; the "no-cache" clause in `Cache-Control` and `Pragma` will be included. - * `[api:HTTP::register_modification_date()]` can be used to set the modification date to something more recent than the default. + * [api:HTTP::register_modification_date()] can be used to set the modification date to something more recent than the default. How it works: - * `[api:DataObject::__construct()]` calls `[api:HTTP::register_modification_date()]` whenever a record comes from the database - * `Controller::run()` calls `[api:HTTP::add_cache_headers()]` before outputting the page \ No newline at end of file + * [api:DataObject::__construct()] calls [api:HTTP::register_modification_date()] whenever a record comes from the database + * [api:Controller::run()] calls [api:HTTP::add_cache_headers()] before outputting the page diff --git a/docs/en/howto/csv-import.md b/docs/en/howto/csv-import.md index 0d5fadec0..863eb27c3 100644 --- a/docs/en/howto/csv-import.md +++ b/docs/en/howto/csv-import.md @@ -26,7 +26,7 @@ Feature overview: You can use the CsvBulkLoader without subclassing or other customizations, if the column names in your CSV file match `$db` properties in your dataobject. E.g. a simple import for the -`[api:Member]` class could have this data in a file: +[api:Member] class could have this data in a file: FirstName,LastName,Email Donald,Duck,donald@disney.com @@ -38,7 +38,7 @@ The loader would be triggered through the `load()` method: $loader = new CsvBulkLoader('Member'); $result = $loader->load(''); -By the way, you can import `[api:Member]` and `[api:Group]` data through `http://localhost/admin/security` +By the way, you can import [api:Member] and [api:Group] data through `http://localhost/admin/security` interface out of the box. ## Import through ModelAdmin diff --git a/docs/en/howto/dynamic-default-fields.md b/docs/en/howto/dynamic-default-fields.md index 66ee9af54..2388d7c4f 100755 --- a/docs/en/howto/dynamic-default-fields.md +++ b/docs/en/howto/dynamic-default-fields.md @@ -2,7 +2,7 @@ The [api:DataObject::$defaults] array allows you to specify simple static values to be the default value for when a record is created, but in many situations default values needs to be dynamically calculated. In order to do this, the -[api:DataObjectSet->populateDefaults()] method will need to be overloaded. +[api:DataObjectSet::populateDefaults()] method will need to be overloaded. This method is called whenever a new record is instantiated, and you must be sure to call the method on the parent object! @@ -35,4 +35,4 @@ methods. For example: $this->FullTitle = $this->Title; } parent::populateDefaults(); - } \ No newline at end of file + } diff --git a/docs/en/howto/grouping-dataobjectsets.md b/docs/en/howto/grouping-dataobjectsets.md index 4be1c31eb..bd9307648 100755 --- a/docs/en/howto/grouping-dataobjectsets.md +++ b/docs/en/howto/grouping-dataobjectsets.md @@ -3,8 +3,8 @@ The [api:DataObjectSet] class has a number of methods useful for grouping objects by fields. Together with sorting this can be used to break up long lists of data into more manageable sub-sections. -The [api:DataObjectSet->groupBy()] method takes a field name as the single argument, and breaks the set up into a number -of arrays, where each array contains only objects with the same value of that field. The [api:DataObjectSet->GroupedBy()] +The [api:DataObjectSet::groupBy()] method takes a field name as the single argument, and breaks the set up into a number +of arrays, where each array contains only objects with the same value of that field. The [api:DataObjectSet::GroupedBy()] method builds on this and returns the same data in a template-friendly format. ## Grouping Sets By First Letter @@ -65,7 +65,7 @@ this example this will be a method on the Page class. } -The final step is to render this into a template. The [api:DataObjectSet->GroupedBy()] method breaks up the set into +The final step is to render this into a template. The [api:DataObjectSet::GroupedBy()] method breaks up the set into a number of sets, grouped by the field that is passed as the parameter. In this case, the getTitleFirstLetter method defined earlier is used to break them up. @@ -84,7 +84,7 @@ defined earlier is used to break them up. ## Grouping Sets By Month Grouping a set by month is a very similar process. The only difference would be to sort the records by month name, and -then create a method on the DataObject that returns the month name, and pass that to the [api:DataObjectSet->GroupedBy()] +then create a method on the DataObject that returns the month name, and pass that to the [api:DataObjectSet::GroupedBy()] call. Again, the first step is to create a method on the class in question that will be displayed in a list. For this example, @@ -128,7 +128,7 @@ January to December. This can be accomplshed by sorting by the Date field: } -The final step is the render this into the template using the [api:DataObjectSet->GroupedBy()] method. +The final step is the render this into the template using the [api:DataObjectSet::GroupedBy()] method. :::ss // Modules list grouped by the Month Posted @@ -140,4 +140,4 @@ The final step is the render this into the template using the [api:DataObjectSet
  • $Title ($Date.Nice)
  • <% end_control %> - <% end_control %> \ No newline at end of file + <% end_control %> diff --git a/docs/en/howto/index.md b/docs/en/howto/index.md index 0a902b6fa..70dc1a6c8 100644 --- a/docs/en/howto/index.md +++ b/docs/en/howto/index.md @@ -11,6 +11,3 @@ the language and functions which are used in the guides. * [Grouping DataObjectSets](grouping-dataobjectsets). Group results in a [api:DataObjectSet] to create sub sections. * [PHPUnit Configuration](phpunit-configuration). How to setup your testing environment with PHPUnit -## Feedback - -If you have a topic you would like covered in these how to's please ask for it on our [Bug Tracker] `http://open.silverstripe.org` diff --git a/docs/en/howto/phpunit-configuration.md b/docs/en/howto/phpunit-configuration.md index 401244d79..2b3b500ff 100644 --- a/docs/en/howto/phpunit-configuration.md +++ b/docs/en/howto/phpunit-configuration.md @@ -8,7 +8,7 @@ See "[Testing](/topics/testing)" for an overview on how to create unit tests. Short answer: Both are valid ways. The `sake` executable that comes with SilverStripe can trigger a customized -"[api:TestRunner]" class that handles the PHPUnit configuration and output formatting. +[api:TestRunner] class that handles the PHPUnit configuration and output formatting. It's tyically invoked to run all tests through `sake dev/tests/all`, a single test with `sake dev/tests/MyTestClass`, or tests for a module with `sake dev/tests/module/mymodulename`. While the custom test runner a handy tool, its also more limited than using `phpunit` directly, @@ -136,4 +136,4 @@ or through a `` flag in your `phpunit.xml` (see [Appenix C: "Setting PHP IN
    It is recommended that you still run your tests with the original database driver (at least on continuous integration) to ensure a realistic test scenario. -
    \ No newline at end of file + diff --git a/docs/en/index.md b/docs/en/index.md index 27d97687b..e442ee94d 100644 --- a/docs/en/index.md +++ b/docs/en/index.md @@ -4,9 +4,12 @@ Please read our [guide to contributing documentation](misc/contributing#writing- ### Overview - * [Getting started](http://silverstripe.org/getting-started/) | [Feature Overview] `http://silverstripe.org/introduction/` | [Demo](http://demo.silverstripe.org/) - * [Download and Installation](installation/) | [Upgrading](/installation/upgrading) | [Requirements](/installation/server-requirements) | [Changelog] `http://open.silverstripe.org/wiki/ChangeLog` | [Roadmap] `http://open.silverstripe.com/roadmap` - * [API documentation](http://api.silverstripe.org/current) | [Official english book] `http://www.silverstripe.org/silverstripe-book` | [Official german book] `http://www.silverstripe.org/das-silverstripe-buch` + * [Getting started](http://silverstripe.org/getting-started/) | + [CMS Overview](http://www.silverstripe.org/software/cms/) | + [Framework Overview](http://www.silverstripe.org/software/framework/) | + [Demo](http://demo.silverstripe.org/) + * [Download and Installation](installation/) | [Upgrading](/installation/upgrading) | [Requirements](/installation/server-requirements) | [Changelogs](changelogs) + * [API documentation](http://api.silverstripe.org/current) | [Books](http://www.silverstripe.org/learn/resources/books) ### Getting support @@ -16,7 +19,7 @@ Please read our [guide to contributing documentation](misc/contributing#writing- ### Level 1: Building your first SilverStripe website - * [Introduction to PHP5 (zend.com)] `http://devzone.zend.com/node/view/id/627` + * [Introduction to PHP (codeacademy.com)](https://www.codecademy.com/learn/php) * [Tutorials](tutorials) * [Building a basic site](tutorials/building-a-basic-site) * [Extending a basic site](tutorials/extending-a-basic-site) @@ -58,6 +61,3 @@ Please read our [guide to contributing documentation](misc/contributing#writing- * [Contributing](http://www.silverstripe.org/contributing-to-silverstripe/) * [Coding Conventions](misc/coding-conventions) -
    -Looking for the old DokuWiki installation? See [doc.silverstripe.org/old] `http://doc.silverstripe.org/old`. -
    diff --git a/docs/en/installation/common-problems.md b/docs/en/installation/common-problems.md index c37e0793a..3d93fd860 100644 --- a/docs/en/installation/common-problems.md +++ b/docs/en/installation/common-problems.md @@ -55,7 +55,7 @@ every page on the site, if that's easier. ## I can see unparsed PHP output in my browser -Please make sure all code inside `*.php` files is wrapped in classes. Due to the way `[api:ManifestBuilder]` +Please make sure all code inside `*.php` files is wrapped in classes. Due to the way [api:ManifestBuilder] includes all files with this extension, any **procedural code will be executed on every call**. Most common error here is putting a test.php/phpinfo.php file in the document root. See [datamodel](/topics/datamodel) and [controllers](/topics/controller) for ways how to structure your code. diff --git a/docs/en/installation/mac-osx.md b/docs/en/installation/mac-osx.md index 3f0163ec8..19867323d 100644 --- a/docs/en/installation/mac-osx.md +++ b/docs/en/installation/mac-osx.md @@ -3,7 +3,7 @@ This topic covers setting up your Mac as a Web Server and installing SilverStripe. While OSX Comes bundled with PHP and Apache (Thanks Apple!) Its not quite ideal for SilverStripe so for setting up a -webserver on OSX we suggest using [MAMP](http://www.mamp.info/en/index.php) or using [MacPorts](http://www.macports.org/) +webserver on OSX we suggest using [MAMP](https://www.mamp.info/en) or using [MacPorts](http://www.macports.org/) to manage your packages. If you want to use the default OSX PHP version then you will need to recompile your own versions of PHP with GD. Providing instructions @@ -34,4 +34,4 @@ won't come along. Open your web browser and go to `http://localhost:8888/silverstripe/`. Enter your database details - by default with MAMP its user `root` and password `root` and select your account details. Click "Check Details". -Once everything is sorted hit Install! and Voila you have SilverStripe installed \ No newline at end of file +Once everything is sorted hit Install! and Voila you have SilverStripe installed diff --git a/docs/en/installation/windows-manual-iis-6.md b/docs/en/installation/windows-manual-iis-6.md index afcecb9dd..37954db26 100644 --- a/docs/en/installation/windows-manual-iis-6.md +++ b/docs/en/installation/windows-manual-iis-6.md @@ -122,7 +122,7 @@ When ready, hit **Install SilverStripe**. SilverStripe should now be installed and you should have a basic site with three pages. -However, URLs will not look "nice", like this: http://localhost/index.php/about-us. In order to fix this problem, we need to install a third-party URL rewriting tool, as IIS 6 does not support this natively. +However, URLs will not look "nice", like this: `http://localhost/index.php/about-us`. In order to fix this problem, we need to install a third-party URL rewriting tool, as IIS 6 does not support this natively. Proceed to **Install IIRF** below to enable nice URLs. diff --git a/docs/en/installation/windows-pi.md b/docs/en/installation/windows-pi.md index c78827d99..a1466ad66 100644 --- a/docs/en/installation/windows-pi.md +++ b/docs/en/installation/windows-pi.md @@ -18,7 +18,7 @@ After you've installed SilverStripe on XP using WebPI. You'll need to make a configuration change to get it working. Specifically, you need to configure XP not to check that a script file exists before executing the script. This is -necessary for URLs of the form http://localhost/silverstripe/index.php/about-us/ to work. +necessary for URLs of the form `http://localhost/silverstripe/index.php/about-us/` to work. * Open IIS Administrator * Expand the local computer tree node diff --git a/docs/en/misc/contributing.md b/docs/en/misc/contributing.md index 076be45c2..0c51715b7 100644 --- a/docs/en/misc/contributing.md +++ b/docs/en/misc/contributing.md @@ -41,7 +41,7 @@ step. * It's better to submit multiple patches with separate bits of functionality than a big patch containing lots of changes * Document your code inline through [PHPDoc](http://en.wikipedia.org/wiki/PHPDoc) syntax. See our -[API documentation] `http://api.silverstripe.org/trunk` for good examples. + [API documentation](http://api.silverstripe.org) for examples and [SS Markdown](/misc/ss-markdown). * Also check and update documentation on [doc.silverstripe.org](http://doc.silverstripe.org). Check for any references to functionality deprecated or extended through your patch. Documentation changes should be included in the patch. * We will attribute the change to you whereever possible (git does this automatically for pull requests) * If you get stuck, please post to the [forum](http://silverstripe.org/forum) or for deeper core problems, to the [core mailinglist](https://groups.google.com/forum/#!forum/silverstripe-dev) @@ -200,7 +200,7 @@ Contributing documentation is the same process as providing any other patch should fit elsewhere. *Example: ModelAdmin* * **Misc**: "Meta" documentation like coding conventions that doesn't directly relate to a feature or API. -See [What to write (jacobian.org)](http://jacobian.org/writing/great-documentation/what-to-write/) for an excellent +See [What to write (jacobian.org)](http://jacobian.org/writing/what-to-write/) for an excellent introduction to the different types of documentation, and [Producing OSS: "Documentation"](http://producingoss.com/en/getting-started.html#documentation) for good rules of thumb for documenting opensource software. @@ -280,7 +280,7 @@ The [sapphiredocs] `https://github.com/silverstripe/silverstripe-sapphiredocs` m ### Further reading -* [Writing great documentation (jacobian.org)](http://jacobian.org/writing/great-documentation/) +* [Writing great documentation (jacobian.org)](https://jacobian.org/writing/great-documentation/) * [How tech writing sucks: Five Sins](http://www.slash7.com/articles/2006/11/15/tech-writing-the-five-sins) * [What is good documentation?](http://www.techscribe.co.uk/techw/whatis.htm) diff --git a/docs/en/reference/advanced-templates.md b/docs/en/reference/advanced-templates.md index 766396de2..bf3f649e0 100644 --- a/docs/en/reference/advanced-templates.md +++ b/docs/en/reference/advanced-templates.md @@ -75,10 +75,10 @@ In this example, `$A` and `$B` refer to `$obj->Property()->A()` and `$obj->Prope <% end_control %> -If the method/field returned is an iterator such as a `[api:DataObject]`, then the control block will be repeated for +If the method/field returned is an iterator such as a [api:DataObject], then the control block will be repeated for each element of that iterator. This is the cornerstone of all menu and list generation in SilverStripe. -In this example, `Menu(1)` returns a `[api:DataObjectSet]` listing each top level main menu item (for more info on `Menu(1)`: +In this example, `Menu(1)` returns a [api:DataObjectSet] listing each top level main menu item (for more info on `Menu(1)`: [Making a Navigation System](/tutorials/building-a-basic-site#Making-a-Navigation-System)). The `` tag is repeated once for each main menu item, and the `$Link` and `$Title` values for each menu item is substituted in. @@ -165,7 +165,7 @@ for adding notes for other developers but for things you don't want published in ### Formatting Template Values -The following example takes the Title field of our object, casts it to a `[api:Varchar]` object, and then calls +The following example takes the Title field of our object, casts it to a [api:Varchar] object, and then calls the `$XML` object on that Varchar object. :::ss @@ -241,8 +241,8 @@ Will give you the ability to call `$MyCustomValue` from anywhere in your templat // output "I've got one thing to say to you: Hi, this is my site" -Your function could return a single value as above or it could be a subclass of `[api:ArrayData]` for example a -`[api:DataObject]` with many values then each of these could be accessible via a control loop +Your function could return a single value as above or it could be a subclass of [api:ArrayData] for example a +[api:DataObject] with many values then each of these could be accessible via a control loop :::php .. @@ -298,9 +298,9 @@ This is all very well and good, but how do the templates actually get called? Templates do nothing on their own. Rather, they are used to render *a particular object*. All of the `<% if %>`, `<%control %>`, and variable codes are methods or parameters that are called *on that object*. All that is necessary is -that the object is an instance of `[api:ViewableData]` (or one of its subclasses). +that the object is an instance of [api:ViewableData] (or one of its subclasses). -The key is `[api:ViewableData::renderWith()]`. This method is passed a For example, within the controller's default action, +The key is [api:ViewableData::renderWith()]. This method is passed a For example, within the controller's default action, there is an instruction of the following sort: :::php @@ -310,7 +310,7 @@ there is an instruction of the following sort: Here's what this line does: * First `renderWith()` constructs a new object: `$template = new SSViewer("TemplateName");` -* `[api:SSViewer]` will take the content of `TemplateName.ss`, and turn it into PHP code. +* [api:SSViewer] will take the content of `TemplateName.ss`, and turn it into PHP code. * Then `renderWith()` passes the controller to `$template->process($controller);` * `SSViewer::process()` will execute the PHP code generated from `TemplateName.ss` and return the results. @@ -320,7 +320,7 @@ Here's what this line does: available template name. Below is an example of how to implement renderWith. In the example below the page is rendered using the myAjaxTemplate -if the page is called by an ajax function (using `[api:Director::is_ajax()]`). Note that the index function is called by +if the page is called by an ajax function (using [api:Director::is_ajax()]). Note that the index function is called by default if it exists and there is no action in the url parameters. :::php diff --git a/docs/en/reference/built-in-page-controls.md b/docs/en/reference/built-in-page-controls.md index b6e425728..518ee8ae8 100644 --- a/docs/en/reference/built-in-page-controls.md +++ b/docs/en/reference/built-in-page-controls.md @@ -4,7 +4,7 @@ Ever wonder when you use `$Title` and `<% Control Children %>` what else you can call in the templates?. This page is here to help with a guide on what template controls you can call. -**Note for advanced users:** These built-in page controls are defined in the `[api:SiteTree]` classes, which are the +**Note for advanced users:** These built-in page controls are defined in the [api:SiteTree] classes, which are the 'root' data-object and controller classes for all the sites. So if you're dealing with something that isn't a sub-class of one of these, our handy reference to 'built-in page controls' won't be so relevant. @@ -220,18 +220,18 @@ These controls detect the visitor's previous experience with the site: #### $Now.Nice, $Now.Year -$Now returns the current date. You can call any of the methods from the `[api:Date]` class on +$Now returns the current date. You can call any of the methods from the [api:Date] class on it. #### $Created.Nice, $Created.Ago $Created returns the time the page was created, $Created.Ago returns how long ago the page was created. You can also -call any of methods of the `[api:Date]` class on it. +call any of methods of the [api:Date] class on it. #### $LastEdited.Nice, $LastEdited.Ago $LastEdited returns the time the page was modified, $LastEdited.Ago returns how long ago the page was modified.You can also -call any of methods of the `[api:Date]` class on it. +call any of methods of the [api:Date] class on it. ### DataObjectSet Options diff --git a/docs/en/reference/complextablefield.md b/docs/en/reference/complextablefield.md index e28052e7b..e6c51e025 100644 --- a/docs/en/reference/complextablefield.md +++ b/docs/en/reference/complextablefield.md @@ -2,20 +2,20 @@ ## Introduction -Shows a group of DataObjects as a (readonly) tabular list (similiar to `[api:TableListField]`.) +Shows a group of DataObjects as a (readonly) tabular list (similiar to [api:TableListField].) You can specify limits and filters for the resultset by customizing query-settings (mostly the ID-field on the other side of a one-to-many-relationship). -See `[api:TableListField]` for more documentation on the base-class +See [api:TableListField] for more documentation on the base-class ## Source Input -See `[api:TableListField]`. +See [api:TableListField]. ## Setting Parent/Child-Relations -`[api:ComplexTableField]` tries to determine the parent-relation automatically by looking at the $has_one property on the listed +[api:ComplexTableField] tries to determine the parent-relation automatically by looking at the $has_one property on the listed child, or the record loaded into the surrounding form (see getParentClass() and getParentIdName()). You can force a specific parent relation: @@ -65,7 +65,7 @@ If you don't want several functions to appear (e.g. no add-link), there's severa * Use `ComplexTableField->setPermissions(array("show","edit"))` to limit the functionality without touching the template (more secure). Possible values are "show","edit", "delete" and "add". -* Subclass `[api:ComplexTableField]` and override the rendering-mechanism +* Subclass [api:ComplexTableField] and override the rendering-mechanism * Use `ComplexTableField->setTemplate()` and `ComplexTableField->setTemplatePopup()` to provide custom templates ### Customising fields and Requirements in the popup @@ -73,7 +73,7 @@ If you don't want several functions to appear (e.g. no add-link), there's severa There are several ways to customise the fields in the popup. Often you would want to display more information in the popup as there is more real-estate for you to play with. -`[api:ComplexTableField]` gives you several options to do this. You can either +[api:ComplexTableField] gives you several options to do this. You can either * Pass a FieldSet in the constructor. * Pass a String in the constructor. @@ -83,7 +83,7 @@ The second will call the String as a method on the source class (Which should re Popup. You can also customise Javascript which is loaded for the Lightbox. As Requirements::clear() is called when the popup is -instantiated, `[api:ComplexTableField]` will look for a function to gather any specific requirements that you might need on your +instantiated, [api:ComplexTableField] will look for a function to gather any specific requirements that you might need on your source class. (e.g. Inline Javascript or styling). For this, create a function called "getRequirementsForPopup". @@ -116,7 +116,7 @@ You'll have to do something like this in your form: You have to hack in an ID on the form, as the CMS forms have this, and front end forms usually do not. -It's not a perfect solution, but it works relatively well to get a simple `[api:ComplexTableField]` up and running on the front +It's not a perfect solution, but it works relatively well to get a simple [api:ComplexTableField] up and running on the front end. To come: Make it a lot more flexible so tables can be easily used on the front end. It also needs to be flexible enough @@ -132,19 +132,19 @@ Most of the time, you need to override the following methods: ### Examples -* `[api:AssetTableField]` -* `[api:MemberTableField]` +* [api:AssetTableField] +* [api:MemberTableField] ## API Documentation -`[api:ComplexTableField]` +[api:ComplexTableField] ## Todo * Find a less fragile solution for accessing this field through the main controller and ReferencedField, e.g. build a seperate CTF-instance (doesn't necessarly have to be connected to the original by ReferencedField) * Control width/height of popup by constructor (hardcoded at the moment) -* Integrate search from MemberTableField.php directly on `[api:ComplexTableField]` +* Integrate search from MemberTableField.php directly on [api:ComplexTableField] * Less performance-hungry implementation of detail-view paging (don't return all items on a single view) * Use automatic has-many and many-many functions to return a ComponentSet rather than building the join manually * Javascript/Ajax-Sorting (see [http://www.activewidgets.com/grid/](http://www.activewidgets.com/grid/) and [http://openrico.org/rico/livegrid.page](http://openrico.org/rico/livegrid.page)) diff --git a/docs/en/reference/database-structure.md b/docs/en/reference/database-structure.md index 0f728a922..c185fde3e 100644 --- a/docs/en/reference/database-structure.md +++ b/docs/en/reference/database-structure.md @@ -5,7 +5,7 @@ opting for "convention over configuration". This page details what that databas ## Base tables -Each direct sub-class of `[api:DataObject]` will have its own table. +Each direct sub-class of [api:DataObject] will have its own table. The following fields are always created. @@ -36,21 +36,21 @@ data sub-classed objects across **multiple tables**. For example, suppose we have the following set of classes: -* Class `[api:SiteTree]` extends `[api:DataObject]`: Title, Content fields -* Class `[api:Page]` extends `[api:SiteTree]`: Abstract field -* Class NewsSection extends `[api:SiteTree]`: *No special fields* -* Class NewsArticle extend `[api:Page]`: ArticleDate field +* Class [api:SiteTree] extends [api:DataObject]: Title, Content fields +* Class Page extends [api:SiteTree]: Abstract field +* Class NewsSection extends [api:SiteTree]: *No special fields* +* Class NewsArticle extend Page: ArticleDate field The data for the following classes would be stored across the following tables: -* `[api:SiteTree]` +* [api:SiteTree] * ID: Int * ClassName: Enum('SiteTree', 'Page', 'NewsArticle') * Created: Datetime * LastEdited: Datetime * Title: Varchar * Content: Text -* `[api:Page]` +* Page * ID: Int * Abstract: Text * NewsArticle @@ -59,16 +59,16 @@ The data for the following classes would be stored across the following tables: The way it works is this: -* "Base classes" are direct sub-classes of `[api:DataObject]`. They are always given a table, whether or not they have +* "Base classes" are direct sub-classes of [api:DataObject]. They are always given a table, whether or not they have special fields. This is called the "base table" * The base table's ClassName field is set to class of the given record. It's an enumeration of all possible sub-classes of the base class (including the base class itself) * Each sub-class of the base object will also be given its own table, *as long as it has custom fields*. In the example above, NewsSection didn't have its own data and so an extra table would be redundant. * In all the tables, ID is the primary key. A matching ID number is used for all parts of a particular record: -record #2 in Page refers to the same object as record #2 in `[api:SiteTree]`. +record #2 in Page refers to the same object as record #2 in [api:SiteTree]. -To retrieve a news article, SilverStripe joins the `[api:SiteTree]`, `[api:Page]` and NewsArticle tables by their ID fields. We use a +To retrieve a news article, SilverStripe joins the [api:SiteTree], Page and NewsArticle tables by their ID fields. We use a left-join for robustness; if there is no matching record in Page, we can return a record with a blank Article field. ## Staging and versioning @@ -102,15 +102,15 @@ It **won't** do any of the following The information documented in this page is reflected in a few places in the code: -* `[api:DataObject]` +* [api:DataObject] * requireTable() is responsible for specifying the required database schema * instance_get() and instance_get_one() are responsible for generating the database queries for selecting data. * write() is responsible for generating the database queries for writing data. -* `[api:Versioned]` +* [api:Versioned] * augmentWrite() is responsible for altering the normal database writing operation to handle versions. * augmentQuery() is responsible for altering the normal data selection queries to support versions. * augmentDatabase() is responsible for specifying the altered database schema to support versions. -* `[api:MySQLDatabase]`: getNextID() is used when creating new objects; it also handles the mechanics of +* [api:MySQLDatabase]: getNextID() is used when creating new objects; it also handles the mechanics of updating the database to have the required schema. diff --git a/docs/en/reference/dataobject.md b/docs/en/reference/dataobject.md index 628fc0043..e1328549c 100644 --- a/docs/en/reference/dataobject.md +++ b/docs/en/reference/dataobject.md @@ -8,12 +8,12 @@ A single database record & abstract class for the data-access-model. * [datamodel](/topics/datamodel): The basic pricinples * [data-types](/topics/data-types): Casting and special property-parsing -* `[api:DataObject]`: A "container" for DataObjects +* [api:DataObject]: A "container" for DataObjects ## Basics -The call to `DataObject->getCMSFields()` is the centerpiece of every data administration interface in SilverStripe, -which returns a `[api:FieldSet]`''. +The call to [api:DataObject::getCMSFields()] is the centerpiece of every data administration interface in SilverStripe, +which returns a [api:FieldSet]. :::php class MyPage extends Page { @@ -27,7 +27,7 @@ which returns a `[api:FieldSet]`''. ## Scaffolding Formfields -These calls retrieve a `[api:FieldSet]` for the area where you intend to work with the scaffolded form. +These calls retrieve a [api:FieldSet] for the area where you intend to work with the scaffolded form. ### For the CMS @@ -39,8 +39,8 @@ These calls retrieve a `[api:FieldSet]` for the area where you intend to work wi ### For the Frontend -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 decorate it by `DataObjectDecorator->updateFormFields()`. +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 decorate it by [api:DataObjectDecorator::updateFormFields()]. * Requirements: SilverStripe 2.3.* @@ -53,7 +53,7 @@ default. To customize, either overload this method in your subclass, or decorate * Requirements: SilverStripe 2.3.* 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 @@ -80,8 +80,8 @@ Example: Simple Definition } -Searchable fields will be appear in the search interface with a default form field (usually a `[api:TextField]`) and a default -search filter assigned (usually an `[api:ExactMatchFilter]`). To override these defaults, you can specify additional information +Searchable fields will be appear in the search interface with a default form field (usually a [api:TextField]) and a default +search filter assigned (usually an [api:ExactMatchFilter]). To override these defaults, you can specify additional information on `$searchable_fields`: :::php @@ -93,7 +93,7 @@ on `$searchable_fields`: } -If you assign a single string value, you can set it to be either a `[api:FormField]` or `[api:SearchFilter]`. To specify both, you can +If you assign a single string value, you can set it to be either a [api:FormField] or [api:SearchFilter]. To specify both, you can assign an array: :::php @@ -142,8 +142,8 @@ To include relations (''$has_one'', `$has_many` and `$many_many`) in your search * 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 -their display as table columns, e.g. in the search results of a `[api:ModelAdmin]` CMS interface. +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. Example: Getting predefined summary fields @@ -191,4 +191,4 @@ To include relations in your summaries, you can use a dot-notation. ## API Documentation -`[api:DataObject]` +[api:DataObject] diff --git a/docs/en/reference/dataobjectdecorator.md b/docs/en/reference/dataobjectdecorator.md index 2fab18cee..df059f399 100644 --- a/docs/en/reference/dataobjectdecorator.md +++ b/docs/en/reference/dataobjectdecorator.md @@ -2,14 +2,14 @@ ## Introduction -Extensions (also referred to as decorators) allow for adding additional functionality to a `[api:DataObject]`. +Extensions (also referred to as decorators) allow for adding additional functionality to a [api:DataObject]. In some cases, it can be easier to completely replace the used class throughout the core with your custom -implementation. Have a look at `[api:Object->useCustomClass()]`. +implementation. Have a look at [api:Object::useCustomClass()]. ## Usage -Your Decorator will nee to be a subclass of `[api:DataObjectDecorator]` or the `[api:Extension]` class. +Your Decorator will nee to be a subclass of [api:DataObjectDecorator] or the [api:Extension] class. :::php owner. -* $this = The `[api:DataObjectDecorator]` object. -* $this->owner = The related `[api:DataObject]` object. +* $this = The [api:DataObjectDecorator] object. +* $this->owner = The related [api:DataObject] object. -If you want to add your own internal properties, you can add this to the `[api:DataObjectDecorator]`, and these will be referred -to as `$this->propertyName`. Every `[api:DataObject]` has an associated `[api:DataObjectDecorator]` instance for each class that it is +If you want to add your own internal properties, you can add this to the [api:DataObjectDecorator], and these will be referred +to as `$this->propertyName`. Every [api:DataObject] has an associated [api:DataObjectDecorator] instance for each class that it is decorated by. :::php @@ -169,4 +169,5 @@ decorated by. ## API Documentation -`[api:DataObjectDecorator]` \ No newline at end of file + +[api:DataObjectDecorator] diff --git a/docs/en/reference/dataobjectset.md b/docs/en/reference/dataobjectset.md index 97e45fb4b..eded51668 100644 --- a/docs/en/reference/dataobjectset.md +++ b/docs/en/reference/dataobjectset.md @@ -2,11 +2,11 @@ ## Introduction -This class represents a set of `[api:DataObject]`s, such as the results of a query. It is the base for all +This class represents a set of [api:DataObject]'s, such as the results of a query. It is the base for all [datamodel](/topics/datamodel)-related querying. It implements the [Iterator interface](http://php.net/manual/en/language.oop5.iterations.php) introduced in PHP5. -Relations (`has_many`/`many_many`) are described in `[api:ComponentSet]`, a subclass of `[api:DataObjectSet]`. +Relations (`has_many`/`many_many`) are described in [api:ComponentSet], a subclass of [api:DataObjectSet]. ## Usage @@ -37,7 +37,7 @@ Relations (`has_many`/`many_many`) are described in `[api:ComponentSet]`, a subc ### Grouping -You can group a set by a specific column. Consider using `[api:SQLQuery]` with a *GROUP BY* statement for enhanced +You can group a set by a specific column. Consider using [api:SQLQuery] with a *GROUP BY* statement for enhanced performance. :::php @@ -56,7 +56,7 @@ This works on the object itself, so do NOT do something like this: :::php $sortedSet = $mySet->sort('Lastname'); //ascending -## Merge with other `[api:DataObjectSet]`s +## Merge with other [api:DataObjectSet]s :::php $myFirstSet->merge($mySecondSet); @@ -65,7 +65,7 @@ This works on the object itself, so do NOT do something like this: ### Mapping for Dropdowns -When using `[api:DropdownField]` and its numerous subclasses to select a value from a set, you can easily map +When using [api:DropdownField] and its numerous subclasses to select a value from a set, you can easily map the records to a compatible array: :::php @@ -88,11 +88,11 @@ It is good practice to check for empty sets before doing any iteration. ### Paging -`[api:DataObject]`s have native support for dealing with **pagination**. +[api:DataObject]s have native support for dealing with **pagination**. See *setPageLimits*, *setPageLength*, etc. FIXME Complete pagination documentation ## API Documentation -`[api:DataObjectSet]` +[api:DataObjectSet] diff --git a/docs/en/reference/director.md b/docs/en/reference/director.md index e8fa6199f..c5b0af81a 100644 --- a/docs/en/reference/director.md +++ b/docs/en/reference/director.md @@ -2,7 +2,7 @@ ## Introduction -`[api:Director]` is the first step in the "execution pipeline". It parses the URL, matching it to one of a number of patterns, +[api:Director] is the first step in the "execution pipeline". It parses the URL, matching it to one of a number of patterns, and determines the controller, action and any argument to be used. It then runs the controller, which will finally run the viewer and/or perform processing steps. @@ -12,7 +12,7 @@ the viewer and/or perform processing steps. ## Redirection -The `[api:Director]` class has a number of methods to facilitate 301 and 302 HTTP redirection. +The [api:Director] class has a number of methods to facilitate 301 and 302 HTTP redirection. * **Director::redirect("action-name")**: If there's no slash in the URL passed to redirect, then it is assumed that you want to go to a different action on the current controller. @@ -33,8 +33,8 @@ redirectBack(). You can influence the way URLs are resolved one of 2 ways -1. Adding rules to `[api:Director]` in `/_config.php` (See Default Rewrite Rules below for examples) -2. Adding rules in your extended `[api:Controller]` class via the *$url_handlers* static variable +1. Adding rules to [api:Director] in `/_config.php` (See Default Rewrite Rules below for examples) +2. Adding rules in your extended [api:Controller] class via the *$url_handlers* static variable See [controller](/topics/controller) for examples and explanations on how the rules get processed for both 1 and 2 above. @@ -56,8 +56,8 @@ SilverStripe comes with certain rewrite rules (e.g. for *admin/assets*). ## Links -* See `[api:ModelAsController]` class for details on controller/model-coupling +* See [api:ModelAsController] class for details on controller/model-coupling * See [execution-pipeline](/reference/execution-pipeline) for custom routing ## API Documentation -`[api:Director]` +[api:Director] diff --git a/docs/en/reference/execution-pipeline.md b/docs/en/reference/execution-pipeline.md index 08d53a516..c69fb17da 100644 --- a/docs/en/reference/execution-pipeline.md +++ b/docs/en/reference/execution-pipeline.md @@ -50,13 +50,13 @@ mod_rewrite works. All requests go through main.php, which sets up the environment and then hands control over to Director. -**See:** The API documentation of `[api:Main]` for information about how main.php processes requests. +**See:** The API documentation of [api:Main] for information about how main.php processes requests. ## Director and URL patterns -main.php relies on `[api:Director]` to work out which controller should handle this request. `[api:Director]` will instantiate that -controller object and then call `[api:Controller::run()]`. +main.php relies on [api:Director] to work out which controller should handle this request. [api:Director] will instantiate that +controller object and then call [api:Controller::run()]. -**See:** The API documentation of `[api:Director]` for information about how Director parses URLs and hands control over to a controller object. +**See:** The API documentation of [api:Director] for information about how Director parses URLs and hands control over to a controller object. In general, the URL is build up as follows: page/action/ID/otherID - e.g. `http://www.mysite.com/mypage/addToCart/12`. This will add an object with ID 12 to the cart. @@ -73,9 +73,9 @@ When you create a function, you can access the ID like this: ## Controllers and actions -`[api:Controller]`s are the building blocks of your application. +[api:Controller]s are the building blocks of your application. -**See:** The API documentation for `[api:Controller]` +**See:** The API documentation for [api:Controller] You can access the following controller-method with /team/signup diff --git a/docs/en/reference/form-field-types.md b/docs/en/reference/form-field-types.md index f4a939b54..99c7f3a30 100644 --- a/docs/en/reference/form-field-types.md +++ b/docs/en/reference/form-field-types.md @@ -1,85 +1,85 @@ # Form Field Types -This is a highlevel overview of available `[apiFormField]` subclasses. An automatically generated list is available through our [API](api:FormField) +This is a highlevel overview of available [api:FormField] subclasses. An automatically generated list is available through our [API](api:FormField) ## Formatted Input -* `[AjaxUniqueTextField](api:AjaxUniqueTextField)`: Text field that automatically checks that the value entered is unique for +* [api:AjaxUniqueTextField]: Text field that automatically checks that the value entered is unique for the given set of fields in a given set of tables -* `[AutocompleteTextField](api:AutocompleteTextField)` -* `[ConfirmedPasswordField](api:ConfirmedPasswordField)`: Shows two password-fields, and checks for matching passwords. -* `[CreditCardField](api:CreditCardField)` -* `[CurrencyField](api:CurrencyField)` -* `[EmailField](api:EmailField)` -* `[HTMLEditorField](api:HTMLEditorField)`: A WYSIWYG editor field, powered by tinymce. -* `[NumericField](api:NumericField)`: A Single Numeric field extending a typical TextField but with validation. -* `[PasswordField](api:PasswordField)` -* `[UniqueRestrictedTextField](api:UniqueRestrictedTextField)`: Text field that automatically checks that the value entered +* [api:AutocompleteTextField] +* [api:ConfirmedPasswordField]: Shows two password-fields, and checks for matching passwords. +* [api:CreditCardField] +* [api:CurrencyField] +* [api:EmailField] +* [api:HTMLEditorField]: A WYSIWYG editor field, powered by tinymce. +* [api:NumericField]: A Single Numeric field extending a typical TextField but with validation. +* [api:PasswordField] +* [api:UniqueRestrictedTextField]: Text field that automatically checks that the value entered is unique for the given set of fields in a given set of tables -* `[UniqueTextField](api:UniqueTextField)`: Text field that automatically checks that the value entered is unique for the +* [api:UniqueTextField]: Text field that automatically checks that the value entered is unique for the given set of fields in a given set of tables ## Date/Time -* `[DateField](api:DateField)`: Represents a date in a textfield (New Zealand) -* `[DatetimeField](api:DatetimeField)`: Combined date- and time field -* `[TimeField](api:TimeField)`: Represents time in a textfield (New Zealand) +* [api:DateField]: Represents a date in a textfield (New Zealand) +* [api:DatetimeField]: Combined date- and time field +* [api:TimeField]: Represents time in a textfield (New Zealand) ## Structure -* `[CompositeField](api:CompositeField)`: Base class for all fields that contain other fields. Uses `
    ` in template, but +* [api:CompositeField]: Base class for all fields that contain other fields. Uses `
    ` in template, but doesn't necessarily have any visible styling. -* `[FieldGroup](api:FieldGroup)`: Same as CompositeField, but has default styling (indentation) attached in CMS-context. -* `[api:FieldSet]`: Basic container for sequential fields, or nested fields through CompositeField. Does NOT render a +* [api:FieldGroup]: Same as CompositeField, but has default styling (indentation) attached in CMS-context. +* [api:FieldSet]: Basic container for sequential fields, or nested fields through CompositeField. Does NOT render a ``. -* `[TabSet](api:TabSet)` -* `[Tab](api:Tab)` +* [api:TabSet] +* [api:Tab] ## Actions -* `[api:Form]` for more info -* `[InlineFormAction](api:InlineFormAction)`: Render a button that will act as If you want to add custom behaviour, please +* [api:Form] for more info +* [api:InlineFormAction]: Render a button that will act as If you want to add custom behaviour, please set {inlcudeDefaultJS} to false and work with behaviour.js. -* `[api:Image]`: Action that uses an image instead of a button -* `[InlineFormAction](api:InlineFormAction)`: Prevents placement of a button in the CMS-button-bar. +* [api:Image]: Action that uses an image instead of a button +* [api:InlineFormAction]: Prevents placement of a button in the CMS-button-bar. ## Files -* `[FileField](api:FileField)`: Simple file upload dialog. -* `[FileIFrameField](api:FileIFrameField)`: File uploads through an iframe -* `[api:ImageField]`: Image upload through an iframe, with thumbnails and file-selection from existing assets -* `[SimpleImageField](api:SimpleImageField)`: SimpleImageField provides an easy way of uploading images to Image has_one +* [api:FileField]: Simple file upload dialog. +* [api:FileIFrameField]: File uploads through an iframe +* [api:ImageField]: Image upload through an iframe, with thumbnails and file-selection from existing assets +* [api:SimpleImageField]: SimpleImageField provides an easy way of uploading images to Image has_one relationships. Unlike ImageField, it doesn't use an iframe. ## Relations -* `[ComplexTableField](api:ComplexTableField)`: Provides a tabuar list in your form with view/edit/add/delete links to modify +* [api:ComplexTableField]: Provides a tabuar list in your form with view/edit/add/delete links to modify records with a "has-one"-relationship (in a lightbox-popup). -* `[HasManyComplexTableField](api:HasManyComplexTableField)` -* `[HasOneComplexTableField](api:HasOneComplexTableField)` -* `[LanguageDropdownField](api:LanguageDropdownField)`: An extension to dropdown field, pre-configured to list languages. +* [api:HasManyComplexTableField] +* [api:HasOneComplexTableField] +* [api:LanguageDropdownField]: An extension to dropdown field, pre-configured to list languages. Tied into i18n. -* `[ManyManyComplexTableField](api:ManyManyComplexTableField)` -* `[TableField](api:TableField)` -* `[api:TableListField]` -* `[TreeDropdownField](api:TreeDropdownField)` -* `[TreeMultiselectField](api:TreeMultiselectField)`: represents many-many joins using a tree selector shown in a +* [api:ManyManyComplexTableField] +* [api:TableField] +* [api:TableListField] +* [api:TreeDropdownField] +* [api:TreeMultiselectField]: represents many-many joins using a tree selector shown in a dropdown-like element -* `[api:WidgetArea]` +* [api:WidgetArea] ## Dataless/Utility -* `[DatalessField](api:DatalessField)` - Base class for fields which add some HTML to the form but don't submit any data or +* [api:DatalessField] - Base class for fields which add some HTML to the form but don't submit any data or save it to the database -* `[HeaderField](api:HeaderField)`: Renders a simple `

    `-`

    ` header -* `[HiddenField](api:HiddenField)` -* `[LabelField](api:LabelField)` -* `[LiteralField](api:LiteralField)`: Renders arbitrary HTML into a form. +* [api:HeaderField]: Renders a simple `

    `-`

    ` header +* [api:HiddenField] +* [api:LabelField] +* [api:LiteralField]: Renders arbitrary HTML into a form. ## CMS Field Editor -Please see `[api:HTMLEditorField]` for in-depth documentation about custom forms created through a GUI in the CMS. +Please see [api:HTMLEditorField] for in-depth documentation about custom forms created through a GUI in the CMS. diff --git a/docs/en/reference/image.md b/docs/en/reference/image.md index b7b1bd4b3..55bc412f7 100644 --- a/docs/en/reference/image.md +++ b/docs/en/reference/image.md @@ -2,15 +2,15 @@ ## Introduction -Represents an image object, inheriting all base functionality from the [file](api:file) class with extra functionality +Represents an image object, inheriting all base functionality from the [api:File] class with extra functionality including resizing. ## Usage ### Form Fields -* `[api:Image]`. Designed to provide a complex image uploader for the CMS. -* `[api:SimpleImageField]`. A Simple Image Upload Form +* [api:Image]. Designed to provide a complex image uploader for the CMS. +* [api:SimpleImageField]. A Simple Image Upload Form ### Resizing Images in PHP @@ -102,9 +102,9 @@ For output of an image tag with the image automatically resized to 80px width, y ### Form Upload -For usage on a website form, see `[api:SimpleImageField]`. +For usage on a website form, see [api:SimpleImageField]. -If you want to upload images within the CMS, see `[api:ImageField]`. +If you want to upload images within the CMS, see [api:ImageField]. ### Clearing Thumbnail Cache @@ -120,4 +120,4 @@ image cache. ## API Documentation -`[api:Image]` +[api:Image] diff --git a/docs/en/reference/leftandmain.md b/docs/en/reference/leftandmain.md index c1365e404..730d7e547 100644 --- a/docs/en/reference/leftandmain.md +++ b/docs/en/reference/leftandmain.md @@ -2,7 +2,7 @@ ## Introduction -LeftAndMain is the base class of all the admin area controllers. +LeftAndMain is the base class of all the admin area controllers. ## Best Practices @@ -10,11 +10,11 @@ LeftAndMain is the base class of all the admin area controllers. Please use LeftAndMain::ForceReload to reload the whole form-area after an Ajax-Request. If you just need to refresh parts of the form, please use javascript-replacement in the response of the original Ajax-Request. Consider using -`[api:Form]` for compiling Ajax-Responses and automatic detection of Ajax/Non-Ajax-Calls. +[api:Form] for compiling Ajax-Responses and automatic detection of Ajax/Non-Ajax-Calls. ### Custom Access Checking -You can customize access control in `[api:LeftAndMain]`. +You can customize access control in [api:LeftAndMain]. :::php // mysite/_config.php @@ -144,7 +144,7 @@ For example: static $menu_priority = 60; -See also `[api:CMSMenu]` +See also [api:CMSMenu] ### Translatable Menu Titles @@ -181,10 +181,10 @@ See [Javascript in the CMS](/topics/javascript#javascript-cms) ## Related -* `[api:CMSMain]` -* `[api:AssetAdmin]` -* `[api:SecurityAdmin]` -* `[api:ModelAdmin]` +* [api:CMSMain] +* [api:AssetAdmin] +* [api:SecurityAdmin] +* [api:ModelAdmin] ## TODO diff --git a/docs/en/reference/member.md b/docs/en/reference/member.md index de22b9942..3ae640dc4 100644 --- a/docs/en/reference/member.md +++ b/docs/en/reference/member.md @@ -2,11 +2,11 @@ ## Introduction -The `[api:Member]` class is used to represent user accounts on a SilverStripe site (including newsletter recipients). +The [api:Member] class is used to represent user accounts on a SilverStripe site (including newsletter recipients). ## Testing For Logged In Users -The `[api:Member]` class comes with 2 static methods for getting information about the current logged in user. +The [api:Member] class comes with 2 static methods for getting information about the current logged in user. **Member::currentUserID()** @@ -38,11 +38,11 @@ Returns the full *Member* Object for the current user, returns *null* if user is ## Subclassing
    -This is the least desirable way of extending the `[api:Member]` class. It's better to use `[api:DataObjectDecorator]` +This is the least desirable way of extending the [api:Member] class. It's better to use [api:DataObjectDecorator] (see below).
    -You can defined subclasses of `[api:Member]` to add extra fields or functionality to the built-in membership system. +You can defined subclasses of [api:Member] to add extra fields or functionality to the built-in membership system. :::php class MyMember extends Member { @@ -53,7 +53,7 @@ You can defined subclasses of `[api:Member]` to add extra fields or functionalit } -To ensure that all new members are created using this class, put a call to `[api:Object::useCustomClass()]` in +To ensure that all new members are created using this class, put a call to [api:Object::useCustomClass()] in (project)/_config.php: :::php @@ -64,8 +64,8 @@ Note that if you want to look this class-name up, you can call Object::getCustom ## Overloading getCMSFields() If you overload the built-in function getCMSFields(), then you can change the form that is used to view & edit member -details in the newsletter system. This function returns a `[api:FieldSet]` object. You should generally start by calling -parent::getCMSFields() and manipulate the `[api:FieldSet]` from there. +details in the newsletter system. This function returns a [api:FieldSet] object. You should generally start by calling +parent::getCMSFields() and manipulate the [api:FieldSet] from there. :::php function getCMSFields() { @@ -79,11 +79,11 @@ parent::getCMSFields() and manipulate the `[api:FieldSet]` from there. ## Extending Member or DataObject? -Basic rule: Class `[api:Member]` should just be extended for entities who have some kind of login. -If you have different types of `[api:Member]`s in the system, you have to make sure that those with login-capabilities have +Basic rule: Class [api:Member] should just be extended for entities who have some kind of login. +If you have different types of [api:Member]s in the system, you have to make sure that those with login-capabilities have unique email-addresses (as this is used for login-credentials). -For persons without login-capabilities (e.g. for an address-database), you shouldn't extend `[api:Member]` to avoid conflicts -with the Member-database. This enables us to have a different subclass of `[api:Member]` for an email-address with login-data, +For persons without login-capabilities (e.g. for an address-database), you shouldn't extend [api:Member] to avoid conflicts +with the Member-database. This enables us to have a different subclass of [api:Member] for an email-address with login-data, and another subclass for the same email-address in the address-database. ## Member Role Decorator @@ -96,9 +96,9 @@ class. A better way is to use role decorators to add this behaviour. // OR Member::add_role('ForumRole'); -A role decorator is simply a subclass of `[api:DataObjectDecorator]` that is designed to be used to add behaviour to `[api:Member]`. +A role decorator is simply a subclass of [api:DataObjectDecorator] that is designed to be used to add behaviour to [api:Member]. The roles affect the entire class - all members will get the additional behaviour. However, if you want to restrict -things, you should add appropriate `[api:Permission::checkMember()]` calls to the role's methods. +things, you should add appropriate [api:Permission::checkMember()] calls to the role's methods. :::php class ForumRole extends DataObjectDecorator { @@ -125,4 +125,4 @@ things, you should add appropriate `[api:Permission::checkMember()]` calls to th ## API Documentation -`[api:Member]` \ No newline at end of file +[api:Member] diff --git a/docs/en/reference/modeladmin.md b/docs/en/reference/modeladmin.md index 34e322d47..b9f7b592c 100644 --- a/docs/en/reference/modeladmin.md +++ b/docs/en/reference/modeladmin.md @@ -5,10 +5,10 @@ *Replaces GenericDataAdmin in Silverstripe 2.3* The ModelAdmin provides a simple way to utilize the SilverStripe CMS UI with your own custom data models. The -ModelAdmin uses the `[api:DataObject]`'s Scaffolding to create the search fields, forms, and displayed data within the +ModelAdmin uses the [api:DataObject]'s Scaffolding to create the search fields, forms, and displayed data within the CMS. -In order to customize the ModelAdmin CMS interface you will need to understand how `[api:DataObject]` works. +In order to customize the ModelAdmin CMS interface you will need to understand how [api:DataObject] works. ## Requirements @@ -35,11 +35,11 @@ data objects you want to scaffold an interface for: To add the ModelAdmin to your CMS menu, you simply need to define a couple of statics on your ModelAdmin subclass. See -`[api:LeftAndMain]` on how to make your menu title translatable. +[api:LeftAndMain] on how to make your menu title translatable. ### Step 2 -Add a `$searchable_fields` (See `[api:ModelAdmin::$searchable_fields]`) property to your data +Add a `$searchable_fields` (See [api:ModelAdmin::$searchable_fields]) property to your data models, to define the fields and filters for the search interface: Datamodel `Product`: @@ -97,19 +97,19 @@ If you are seeing a list of ID#s when creating new objects, ensure you have one You can customize the fields which are searchable for each managed DataObject class, as well as the ways in which the fields are searched (e.g. "partial match", "fulltext", etc.) using `$searchable_fields`. - * See `[api:DataObject]` + * See [api:DataObject] ![](_images/modeladmin_search.png) ## Summary Fields -Summary Fields are the columns which are shown in the `[api:TableListField]` when viewing DataObjects. These can be -customized for each `[api:DataObject]`'s search results using `$summary_fields`. +Summary Fields are the columns which are shown in the [api:TableListField] when viewing DataObjects. These can be +customized for each [api:DataObject]'s search results using `$summary_fields`. - * See `[api:DataObject]` + * See [api:DataObject] ## Related -* `[api:SearchContext]` +* [api:SearchContext] * [genericviews Module] `http://silverstripe.org/generic-views-module` * [Presentation about ModelAdmin at SupperHappyDevHouse Wellington](http://www.slideshare.net/chillu/modeladmin-in-silverstripe-23) diff --git a/docs/en/reference/partial-caching.md b/docs/en/reference/partial-caching.md index 01f8ebf55..c0ba2f826 100644 --- a/docs/en/reference/partial-caching.md +++ b/docs/en/reference/partial-caching.md @@ -55,7 +55,7 @@ From a block that shows a summary of the page edits if administrator, nothing if 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 -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 otherwise. By using aggregates, that's easy @@ -236,4 +236,4 @@ Can be re-written as: <% end_control %> <% end_cached %> - <% end_cached %> \ No newline at end of file + <% end_cached %> diff --git a/docs/en/reference/permission.md b/docs/en/reference/permission.md index 4b313e8bd..1516aca2a 100644 --- a/docs/en/reference/permission.md +++ b/docs/en/reference/permission.md @@ -22,7 +22,7 @@ You can use whatever codes you like, but for the sanity of developers and users, ## PermissionProvider -`[api:PermissionProvider]` is an interface which lets you define a method *providePermissions()*. This method should return a +[api:PermissionProvider] is an interface which lets you define a method *providePermissions()*. This method should return a map of permission code names with a human readable explanation of its purpose (see [permissions:codes](/reference/permission)). @@ -71,4 +71,4 @@ information on request objects. ## API Documentation -`[api:Permission]` +[api:Permission] diff --git a/docs/en/reference/requirements.md b/docs/en/reference/requirements.md index b2c66b3d3..2dec31c79 100644 --- a/docs/en/reference/requirements.md +++ b/docs/en/reference/requirements.md @@ -8,7 +8,7 @@ hardcoding any references in the ``-tag of your template, as it enables a ## Including inside PHP Code It is common practice to include most Requirements either in the *init()*-method of your [controller](/topics/controller), or -as close to rendering as possible (e.g. in `[api:FormField]` +as close to rendering as possible (e.g. in [api:FormField] :::php Requirements::javascript("cms/javascript/LeftAndMain.js"); @@ -133,15 +133,15 @@ In your controller's init() function, add: ## CMS Requirements -The SilverStripe core includes a lot of Requirements by itself. Most of these are collated in `[api:LeftAndMain]` first. +The SilverStripe core includes a lot of Requirements by itself. Most of these are collated in [api:LeftAndMain] first. ## Motivation -Every page requested is made up of a number of parts, and many of those parts require their own CSS or JavaScript. +Every page requested is made up of a number of parts, and many of those parts require their own CSS or JavaScript. Rather than force the developer to put all of those requests into the template, or the header function, you can reference required files anywhere in your application. -This lets you create very modular units of PHP+JavaScript+CSS, which a powerful concept but must be managed carefully. +This lets you create very modular units of PHP+JavaScript+CSS, which a powerful concept but must be managed carefully. ## Managing Generic CSS styling @@ -189,4 +189,4 @@ slightly different JS/CSS requirements, the whole lot will be refetched. nature of an ajax-request. Needs some more research ## API Documentation -`[api:Requirements]` \ No newline at end of file +[api:Requirements] diff --git a/docs/en/reference/restfulservice.md b/docs/en/reference/restfulservice.md index bf1818121..32c4b6580 100644 --- a/docs/en/reference/restfulservice.md +++ b/docs/en/reference/restfulservice.md @@ -2,11 +2,11 @@ ## Introduction -`[api:RestfulService]` enables connecting to remote web services which supports REST interface and consume those web services -(for example [Flickr](http://www.flickr.com/services/api/), [Youtube](http://code.google.com/apis/youtube/overview.html), Amazon and etc). `[api:RestfulService]` can parse the XML response (sorry no JSON support) +[api:RestfulService] enables connecting to remote web services which supports REST interface and consume those web services +(for example [Flickr](http://www.flickr.com/services/api/), [Youtube](http://code.google.com/apis/youtube/overview.html), Amazon and etc). [api:RestfulService] can parse the XML response (sorry no JSON support) returned from the web service. Further it supports caching of the response, and you can customize the cache interval. -To gain the functionality you can either create a new `[api:RestfulService]` object or create a class extending the +To gain the functionality you can either create a new [api:RestfulService] object or create a class extending the RestfulService (see [flickrservice] `http://silverstripe.org/flickr-module` and [youtubeservice] `http://silverstripe.org/youtube-gallery-module/` modules). @@ -113,7 +113,7 @@ to get the value of entry node with the namespace media, use: ### Handling Errors -If the web service returned an error (for example, API key not available or inadequate parameters) `[api:RestfulService]` +If the web service returned an error (for example, API key not available or inadequate parameters) [api:RestfulService] could delgate the error handling to it's descendant class. To handle the errors define a function called errorCatch :::php @@ -143,9 +143,9 @@ If you want to bypass error handling on your sub-classes you could define that i ## Other Uses -### How to use `[api:RestfulService]` to easily embed an RSS feed +### How to use [api:RestfulService] to easily embed an RSS feed -`[api:RestfulService]` can be used to easily embed an RSS feed (since it's also an xml response) from a site +[api:RestfulService] can be used to easily embed an RSS feed (since it's also an xml response) from a site such as del.icio.us Put something like this code in mysite/code/Page.php inside class Page_Controller @@ -177,4 +177,4 @@ Put something like this code in mysite/templates/Layout/HomePage.ss: ## API Documentation -`[api:RestfulService]` +[api:RestfulService] diff --git a/docs/en/reference/rssfeed.md b/docs/en/reference/rssfeed.md index 0be4ec7f3..0215f6fa3 100644 --- a/docs/en/reference/rssfeed.md +++ b/docs/en/reference/rssfeed.md @@ -2,12 +2,12 @@ ## Introduction -Generating RSS/Atom-feeds is just a matter of rendering a `[api:DataObject]` and the Page Comment Interface. -Handled through the `[api:RSSFeed]` class. +Generating RSS/Atom-feeds is just a matter of rendering a [api:DataObject] and the Page Comment Interface. +Handled through the [api:RSSFeed] class. -`[api:RSSFeed]` doesn't limit you to generating "article-based" feeds, it is just as easy to create a feed of your current +[api:RSSFeed] doesn't limit you to generating "article-based" feeds, it is just as easy to create a feed of your current staff-members. The only logical limitation here is that every item in the RSS-feed should be accessible through a URL on -your website, so its advisable to just create feeds from subclasses of `[api:SiteTree]`. +your website, so its advisable to just create feeds from subclasses of [api:SiteTree]. ## Usage @@ -31,7 +31,7 @@ your website, so its advisable to just create feeds from subclasses of `[api:Sit ### Example of showing the 10 most recently updated pages -You can use `[api:RSSFeed]` to easily create a feed showing your latest Page updates. Just change mysite/code/Page.php to +You can use [api:RSSFeed] to easily create a feed showing your latest Page updates. Just change mysite/code/Page.php to something like this: :::php @@ -72,7 +72,7 @@ can also do http://www.yoursite.com/PageComment/rss?pageid=46 where pageid is th ## External Sources -`[api:RSSFeed]` only creates feeds from your own data. We've included the [SimplePie](http://simplepie.org) RSS-parser for +[api:RSSFeed] only creates feeds from your own data. We've included the [SimplePie](http://simplepie.org) RSS-parser for accessing feeds from external sources. @@ -81,4 +81,4 @@ accessing feeds from external sources. * [blog module](http://silverstripe.org/blog-module) ## API Documentation -`[api:RSSFeed]` \ No newline at end of file +[api:RSSFeed] diff --git a/docs/en/reference/searchcontext.md b/docs/en/reference/searchcontext.md index a670e906a..47da46019 100644 --- a/docs/en/reference/searchcontext.md +++ b/docs/en/reference/searchcontext.md @@ -2,17 +2,17 @@ ## Introduction -Manages searching of properties on one or more `[api:DataObject]` types, based on a given set of input parameters. -`[api:SearchContext]` is intentionally decoupled from any controller-logic, +Manages searching of properties on one or more [api:DataObject] types, based on a given set of input parameters. +[api:SearchContext] is intentionally decoupled from any controller-logic, it just receives a set of search parameters and an object class it acts on. -The default output of a `[api:SearchContext]` is either a `[api:SQLQuery]` object for further refinement, or a -`[api:DataObject]` instance. +The default output of a [api:SearchContext] is either a [api:SQLQuery] object for further refinement, or a +[api:DataObject] instance. In case you need multiple contexts, consider namespacing your request parameters by using `FieldSet->namespace()` on the $fields constructor parameter. -`[api:SearchContext]` is mainly used by `[api:ModelAdmin]`, our generic data administration interface. Another +[api:SearchContext] is mainly used by [api:ModelAdmin], our generic data administration interface. Another implementation can be found in generic frontend search forms through the [genericviews] `http://silverstripe.org/generic-views-module` module. ## Requirements @@ -29,7 +29,7 @@ Getting results ### Defining fields on your DataObject -See `[api:DataObject::$searchable_fields]`. +See [api:DataObject::$searchable_fields]. ### Customizing fields and filters @@ -180,13 +180,13 @@ Results.PaginationSummary(4) defines how many pages the search will show in the ## Available SearchFilters -See `[api:SearchFilter]` API Documentation +See [api:SearchFilter] API Documentation ## API Documentation -`[api:SearchContext]` +[api:SearchContext] ## Related -* `[api:ModelAdmin]` -* `[api:RestfulServer]` +* [api:ModelAdmin] +* [api:RestfulServer] * [Tutorial: Site Search](/tutorials/site-search) diff --git a/docs/en/reference/site-reports.md b/docs/en/reference/site-reports.md index fd660b919..48210cf95 100644 --- a/docs/en/reference/site-reports.md +++ b/docs/en/reference/site-reports.md @@ -91,4 +91,4 @@ file and add class's as you need them inside that for each report. * More examples. ## API Documentation -`[api:ReportAdmin]` \ No newline at end of file +[api:ReportAdmin] diff --git a/docs/en/reference/siteconfig.md b/docs/en/reference/siteconfig.md index 4b3ef50db..39aa6f48c 100644 --- a/docs/en/reference/siteconfig.md +++ b/docs/en/reference/siteconfig.md @@ -2,12 +2,12 @@ ## 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 was introduced in 2.4 for providing 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'. -## Accessing `[api:SiteConfig]` Options +## Accessing [api:SiteConfig] Options -You can access `[api:SiteConfig]` options from any SS template by using the function $SiteConfig.FieldName +You can access [api:SiteConfig] options from any SS template by using the function $SiteConfig.FieldName :::ss $SiteConfig.Title @@ -28,7 +28,7 @@ Or if you want to access variables in the PHP you can do $config->Title -## Extending `[api:SiteConfig]` +## Extending [api:SiteConfig] To extend the options available in the panel you can define your own fields via an Extension. @@ -58,13 +58,13 @@ Then add a link to your extension in the _config.php file like below. Object::add_extension('SiteConfig', 'CustomSiteConfig'); -This tells SilverStripe to add the CustomSiteConfig extension to the `[api:SiteConfig]` class. +This tells SilverStripe to add the CustomSiteConfig extension to the [api:SiteConfig] class. After adding those two pieces of code, rebuild your database by visiting http://yoursite.com/dev/build and then reload the admin interface. You may need to reload it with a ?flush=1 on the end. -You can define as many extensions for `[api:SiteConfig]` as you need. For example if you are developing a module you can define +You can define as many extensions for [api:SiteConfig] as you need. For example if you are developing a module you can define your own global settings for the dashboard. ## API Documentation -`[api:SiteConfig]` \ No newline at end of file +[api:SiteConfig] diff --git a/docs/en/reference/sitetree.md b/docs/en/reference/sitetree.md index 7fec2c1b5..2511c2faa 100644 --- a/docs/en/reference/sitetree.md +++ b/docs/en/reference/sitetree.md @@ -144,7 +144,7 @@ it is a good starting point, for choosing your customisation. ### Automatic Child Selection -By default, `[api:SiteTree]` class to build a tree using the ParentID field. However, sometimes, you want to change +By default, [api:SiteTree] class to build a tree using the ParentID field. However, sometimes, you want to change this default behaviour. For example, in our e-commerce module, we use a many-to-many join, Product::Parents, to let you put Products in multiple @@ -154,7 +154,7 @@ groups. Here's how to implement such a change: store parents. * **Define stageChildren method:** This method should return the children of the current page, for the current version. - If you use DataObject::get, the `[api:Versioned]` class will rewrite your query to access the live site when + If you use DataObject::get, the [api:Versioned] class will rewrite your query to access the live site when appropriate. * **Define liveChildren method:** The method should return the children of the current page, for the live site. @@ -206,7 +206,7 @@ Example: ### Multiple parents in the tree -The `[api:LeftAndMain]` tree supports multiple parents. We overload CMSTreeClasses and make it include "manyparents" in +The [api:LeftAndMain] tree supports multiple parents. We overload CMSTreeClasses and make it include "manyparents" in the class list. :::php @@ -295,4 +295,4 @@ and the specific group. Clean up this documentation ## API Documentation -`[api:Sitetree]` +[api:Sitetree] diff --git a/docs/en/reference/sqlquery.md b/docs/en/reference/sqlquery.md index 5b562e9a7..453bcc12e 100644 --- a/docs/en/reference/sqlquery.md +++ b/docs/en/reference/sqlquery.md @@ -3,7 +3,7 @@ ## Introduction An object representing a SQL query. It is easier to deal with object-wrappers than string-parsing a raw SQL-query. This -object is used by `[api:DataObject]`, though... +object is used by [api:DataObject], though... A word of caution: Dealing with low-level SQL is not encouraged in the SilverStripe [datamodel](/topics/datamodel) for various reasons. You'll break the behaviour of: @@ -12,7 +12,7 @@ reasons. You'll break the behaviour of: * DataObject::onBeforeWrite/onBeforeDelete * Automatic casting * Default-setting through object-model -* `[api:DataObject]` +* [api:DataObject] * Database abstraction We'll explain some ways to use *SELECT* with the full power of SQL, but still maintain a connection to the SilverStripe @@ -62,7 +62,7 @@ We'll explain some ways to use *SELECT* with the full power of SQL, but still ma ## Working with results -The result is an array lightly wrapped in a database-specific subclass of `[api:Query]`. This class implements the +The result is an array lightly wrapped in a database-specific subclass of [api:Query]. This class implements the *Iterator*-interface defined in PHP5, and provides convenience-methods for accessing the data. ### Iterating @@ -87,7 +87,7 @@ Raw SQL is handy for performance-optimized calls. return $sqlQuery->execute()->value(); } -Way faster than dealing with `[api:DataObject]`s, but watch out for premature optimisation: +Way faster than dealing with [api:DataObject]s, but watch out for premature optimisation: :::php $players = $myTeam->Players(); @@ -142,10 +142,10 @@ This form of building a query has the following advantages: * Selection of *ID*, *ClassName*, *RecordClassName*, which are necessary to use *buildDataObjectSet* later on * Filtering records for correct *ClassName* -### Transforming a result to `[api:DataObjectSet]` +### Transforming a result to [api:DataObjectSet] This is a commonly used technique inside SilverStripe: Use raw SQL, but transfer the resulting rows back into -`[api:DataObject]`s. +[api:DataObject]s. :::php $sqlQuery = new SQLQuery(); @@ -188,21 +188,21 @@ This is a commonly used technique inside SilverStripe: Use raw SQL, but transfer * Not all object-properties accessible: You need to take care of selecting the right stuff yourself * Overlayed object-properties: If you *LEFT JOIN* a table which also has a column 'Birthdate' and do a global select on this table, you might not be able to access original object-properties. -* You can't create `[api:DataObject]`s where no scalar record-data is available, e.g. when using *GROUP BY* +* You can't create [api:DataObject]s where no scalar record-data is available, e.g. when using *GROUP BY* * Naming conflicts with custom getters: A getter like Player->getName() will overlay the column-data selected in the above example -Be careful when saving back `[api:DataObject]`s created through *buildDataObjectSet*, you might get strange side-effects due to +Be careful when saving back [api:DataObject]s created through *buildDataObjectSet*, you might get strange side-effects due to the issues noted above. ## Using FormFields with custom SQL -Some subclasses of `[api:FormField]` for ways to create sophisticated report-tables based on SQL. +Some subclasses of [api:FormField] for ways to create sophisticated report-tables based on SQL. ## Related * [datamodel](/topics/datamodel) -* `[api:DataObject]` +* [api:DataObject] * [database-structure](database-structure) ## API Documentation -`[api:SQLQuery]` \ No newline at end of file +[api:SQLQuery] diff --git a/docs/en/reference/staticpublisher.md b/docs/en/reference/staticpublisher.md index 106d6e9a9..78c11e97a 100644 --- a/docs/en/reference/staticpublisher.md +++ b/docs/en/reference/staticpublisher.md @@ -5,7 +5,7 @@ Many sites get too much traffic to justify dynamically sending every request. Caching is needed. Static Publishing will generate static versions of your content (HTML) that can be served without ever hitting PHP or the Database. -See `[api:StaticExporter]` for a less flexible, but easier way of building a local static cache from all of +See [api:StaticExporter] for a less flexible, but easier way of building a local static cache from all of your pages. See [Partial-Caching](partial-caching) for a much more flexible way of building in caching without statically delivering @@ -262,7 +262,7 @@ example] `http://open.silverstripe.com/browser/modules/cms/trunk/code/staticpubl ## Deployment Once you've set up your rewrite rules and defined which pages need caching, you can build the static HTML files. This is -done by the `[api:RebuildStaticCacheTask]` +done by the [api:RebuildStaticCacheTask] Execution via URL @@ -281,8 +281,8 @@ the cache. ## Related -* `[api:StaticExporter]` +* [api:StaticExporter] * [Partial-Caching](partial-caching) ## API Documentation -* `[api:StaticPublisher]` +* [api:StaticPublisher] diff --git a/docs/en/reference/tablefield.md b/docs/en/reference/tablefield.md index c71580984..d92a73d5f 100644 --- a/docs/en/reference/tablefield.md +++ b/docs/en/reference/tablefield.md @@ -2,10 +2,10 @@ ## Introduction -`[api:TableField]` behaves in the same manner as `[api:TableListField]`, however allows the editing of existing and adding of +[api:TableField] behaves in the same manner as [api:TableListField], however allows the editing of existing and adding of new rows. The data is saved back by the surrounding form-saving (mostly EditForm->save). -See `[api:TableListField]` for more documentation on the base-class +See [api:TableListField] for more documentation on the base-class ## Usage @@ -44,7 +44,7 @@ is created. ### Row Transformation -You can apply a `[api:FormTransformation]` to any given field, +You can apply a [api:FormTransformation] to any given field, based on a eval()ed php-rule. You can access all columns on the generated DataObjects here. :::php @@ -59,23 +59,23 @@ based on a eval()ed php-rule. You can access all columns on the generated DataOb ### Required Fields Due to the nested nature of this fields dataset, you can't set any required columns as usual with the -`[api:RequiredFields]`** on the TableField-instance for this. -Note: You still have to attach some form of `[api:Validator]` to the form to trigger any validation on this field. +[api:RequiredFields]** on the TableField-instance for this. +Note: You still have to attach some form of [api:Validator] to the form to trigger any validation on this field. ### Nested Table Fields -When you have `[api:TableField]` inside a `[api:ComplexTableField]`, the parent ID may not be known in your -getCMSFields() method. In these cases, you can set a value to '$RecordID' in your `[api:TableField]` extra data, and this +When you have [api:TableField] inside a [api:ComplexTableField], the parent ID may not be known in your +getCMSFields() method. In these cases, you can set a value to '$RecordID' in your [api:TableField] extra data, and this will be populated with the newly created record id upon save. ## Known Issues -* A `[api:TableField]` doesn't reload any submitted form-data if the saving is interrupted by a failed validation. After -refreshing the form with the validation-errors, the `[api:TableField]` will be blank again. -* You can't add **visible default data** to columns in a `[api:TableField]`, please use *setExtraData* +* A [api:TableField] doesn't reload any submitted form-data if the saving is interrupted by a failed validation. After +refreshing the form with the validation-errors, the [api:TableField] will be blank again. +* You can't add **visible default data** to columns in a [api:TableField], please use *setExtraData* ## API Documentation -`[api:TableField]` \ No newline at end of file +[api:TableField] diff --git a/docs/en/reference/tablelistfield.md b/docs/en/reference/tablelistfield.md index 625901748..bf6b05f68 100644 --- a/docs/en/reference/tablelistfield.md +++ b/docs/en/reference/tablelistfield.md @@ -2,13 +2,13 @@ ## Introduction -Form field that embeds a list of `[api:DataObject]`s into a form, such as a member list or a file list. +Form field that embeds a list of [api:DataObject]s into a form, such as a member list or a file list. Provides customizeable columns, record-deletion by ajax, paging, sorting, CSV-export, printing, input by -`[api:DataObject]` or raw SQL. +[api:DataObject] or raw SQL. ## Example -Here's an example of a full featured `[api:TableListField]` implementation. It features editing members in the database +Here's an example of a full featured [api:TableListField] implementation. It features editing members in the database directly as a button on each record, as well as filtering, and sorting. It also makes use of the 'export' permission, allowing export of data as a CSV. @@ -90,7 +90,7 @@ For more information on each of the features used in the example, you can read b $customCsvQuery->select[] = "CONCAT(col1,col2) AS MyCustomSQLColumn"; $myTableListField->setCustomCsvQuery($customQuery); -`[api:TableListField]` also tries to resolve Component-relations(has_one, has_many) and custom getters automatically: +[api:TableListField] also tries to resolve Component-relations(has_one, has_many) and custom getters automatically: :::php $myTableListField = new TableListField( @@ -139,7 +139,7 @@ Example (sorting by "FirstName" column): ); -If you want to sort by custom getters in your `[api:DataObject]`, please reformulate them to a custom SQL column. This +If you want to sort by custom getters in your [api:DataObject], please reformulate them to a custom SQL column. This restriction is needed to avoid performance-hits by caching and sorting potentially large datasets on PHP-level. ### Casting @@ -155,7 +155,7 @@ Column-values can be casted, based on the casting-types available through DBObje ### Permissions -Permissions vary in different `[api:TableListField]`-implementations, and are evaluated in the template. +Permissions vary in different [api:TableListField]-implementations, and are evaluated in the template. By default, all listed permissions are enabled. :::php @@ -237,7 +237,7 @@ implement averages etc. ) ); -In `[api:TableListField]`-implementation, these summaries also react to changes in input-fields by javascript. +In [api:TableListField]-implementation, these summaries also react to changes in input-fields by javascript. Available methods: * sum @@ -245,7 +245,7 @@ Available methods: ### Grouping -Used to group by a specific column in the `[api:DataObject]` and create partial summaries. +Used to group by a specific column in the [api:DataObject] and create partial summaries. Please use only together with addSummary(). (Automatically disables sorting). @@ -257,7 +257,7 @@ Please use only together with addSummary(). ### Custom Sorting -Please subclass `[api:TableListField]` to implement custom sorting, following the naming-convention +Please subclass [api:TableListField] to implement custom sorting, following the naming-convention "`colFunction_`". :::php @@ -285,4 +285,4 @@ You can exchange the used template, e.g. to change applied CSS-classes or the HT ## API Documentation -`[api:TableListField]` +[api:TableListField] diff --git a/docs/en/reference/typography.md b/docs/en/reference/typography.md index 1a448557e..823999d8e 100644 --- a/docs/en/reference/typography.md +++ b/docs/en/reference/typography.md @@ -88,7 +88,7 @@ OtherContent: ### Removing the typography class Sometimes, it's not enough to add a class, you also want to remove the typography class. You can use the -`[api:HTMLEditorField]` method setCSSClass. +[api:HTMLEditorField] method setCSSClass. This example sets another CSS class typographybis: @@ -103,4 +103,4 @@ This example sets another CSS class typographybis: } -**Note:** This functionality will be available in the version 2.0.2 of the CMS. \ No newline at end of file +**Note:** This functionality will be available in the version 2.0.2 of the CMS. diff --git a/docs/en/reference/urlvariabletools.md b/docs/en/reference/urlvariabletools.md index 0a1079b51..e9a65ee7c 100644 --- a/docs/en/reference/urlvariabletools.md +++ b/docs/en/reference/urlvariabletools.md @@ -29,7 +29,7 @@ Append the option and corresponding value to your URL in your browser's address | isDev | | 1 | | Put the site into [development mode](/topics/debugging), enabling debugging messages to the browser on a live server. For security, you'll be asked to log in with an administrator log-in | | isTest | | 1 | | Put the site into [test mode](/topics/debugging), enabling debugging messages to the admin email and generic errors to the browser on a live server | | debug | | 1 | | Show a collection of debugging information about the director / controller operation | - | debug_request | | 1 | | Show all steps of the request from initial `[api:HTTPRequest]` to `[api:Controller]` to Template Rendering | + | debug_request | | 1 | | Show all steps of the request from initial [api:HTTPRequest] to [api:Controller] to Template Rendering | ## Classes and Objects diff --git a/docs/en/reference/versioned.md b/docs/en/reference/versioned.md index aa5398719..7e128be46 100644 --- a/docs/en/reference/versioned.md +++ b/docs/en/reference/versioned.md @@ -1,6 +1,6 @@ # Versioned -The Versioned class is a `[api:DataObject]` that adds versioning and staging capabilities to the objects. +The Versioned class is a [api:DataObject] that adds versioning and staging capabilities to the objects. ## Trapping the publication event diff --git a/docs/en/topics/access-control.md b/docs/en/topics/access-control.md index db6c8396d..31ea8d2c2 100644 --- a/docs/en/topics/access-control.md +++ b/docs/en/topics/access-control.md @@ -35,7 +35,7 @@ privileges from its parent group. ## Permission checking is at class level -SilverStripe provides a security mechanism via the *Permission::check* method (see `[api:LeftAndMain]` for examples on how +SilverStripe provides a security mechanism via the *Permission::check* method (see [api:LeftAndMain] for examples on how the admin screens work) (next step -- go from *Permission::checkMember*...) @@ -48,14 +48,14 @@ works. ### Loading the admin page: looking at security -If you go to [your site]/admin *Director.php* maps the 'admin' URL request through a `[api:Director]` rule to the -`[api:CMSMain]` controller (see `[api:CMSMain]`, with no arguments). +If you go to [your site]/admin *Director.php* maps the 'admin' URL request through a [api:Director] rule to the +[api:CMSMain] controller. -*CMSMain.init()* calls its parent which, of all things is called `[api:LeftAndMain]`. It's in `[api:LeftAndMain]` that the +*CMSMain.init()* calls its parent which, of all things is called [api:LeftAndMain]. It's in [api:LeftAndMain] that the important security checks are made by calling *Permission::check*. -`[api:Security::permissionFailure]` is the next utility function you can use to redirect to the login form. +[api:Security::permissionFailure()] is the next utility function you can use to redirect to the login form. ### Customizing Access Checks in CMS Classes -see `[api:LeftAndMain]` \ No newline at end of file +see [api:LeftAndMain] diff --git a/docs/en/topics/configuration.md b/docs/en/topics/configuration.md index 40432aaea..56d04fe90 100644 --- a/docs/en/topics/configuration.md +++ b/docs/en/topics/configuration.md @@ -12,7 +12,7 @@ CMS"] `http://www.silverstripe.com/core-team-discussion/flat/2723` for further r In addition to these principle, some settings are * Author-level configuration like interface language or date/time formats can be performed in the CMS "My Profile" section (`admin/myprofile`). - * Group-related configuration like `[api:HTMLEditorField]` settings can be found in the "Security" section (`admin/security`). + * Group-related configuration like [api:HTMLEditorField] settings can be found in the "Security" section (`admin/security`). * Site-wide settings like page titles can be set (and extended) on the root tree element in the CMS "Content" section (through the [siteconfig](/reference/siteconfig) API). ## _ss_environment.php @@ -21,7 +21,7 @@ See [environment-management](/topics/environment-management). ## mysite/_config.php -This file is detected in each folder by `[api:ManifestBuilder]`. This way, every toplevel-folder (=module) +This file is detected in each folder by [api:ManifestBuilder]. This way, every toplevel-folder (=module) can have independent configuration-rules. @@ -66,8 +66,8 @@ Some constants are user-defineable within *_ss_environment.php*. ## User-level: Member-object -All user-related preferences are stored as a property of the `[api:Member]`-class (and as a database-column in the -*Member*-table). You can "mix in" your custom preferences by using `[api:DataObject]` for details. +All user-related preferences are stored as a property of the [api:Member]-class (and as a database-column in the +*Member*-table). You can "mix in" your custom preferences by using [api:DataObject] for details. ## Permissions diff --git a/docs/en/topics/controller.md b/docs/en/topics/controller.md index e0ad90d8f..6c29bcc0a 100644 --- a/docs/en/topics/controller.md +++ b/docs/en/topics/controller.md @@ -130,9 +130,9 @@ permission checks. ## URL Handling -In the above example the URLs were configured using the `[api:Director]` rules in the **_config.php** file. +In the above example the URLs were configured using the [api:Director] rules in the **_config.php** file. Alternatively you can specify these in your Controller class via the **$url_handlers** static array (which gets -processed by the `[api:RequestHandler]`). +processed by the [api:RequestHandler]). This is useful when you want to subvert the fixed action mapping of `fastfood/order/*` to the function **order**. In the case below we also want any orders coming through `/fastfood/drivethrough/` to use the same order function. @@ -150,7 +150,7 @@ the case below we also want any orders coming through `/fastfood/drivethrough/` ## URL Patterns -The `[api:RequestHandler]` class will parse all rules you specify against the following patterns. +The [api:RequestHandler] class will parse all rules you specify against the following patterns. **A rule must always start with alphabetical ([A-Za-z]) characters or a $Variable declaration** @@ -181,10 +181,10 @@ You can use the `debug_request=1` switch from the [urlvariabletools](/reference/ ## API Documentation -`[api:Controller]` +[api:Controller] ## Links -* `[api:Director]` class +* [api:Director] class * [execution-pipeline](/reference/execution-pipeline) * [URL Handling in Controllers](http://maetl.net/silverstripe-url-handling) by maetl diff --git a/docs/en/topics/data-types.md b/docs/en/topics/data-types.md index a999e2a88..2fdf701dc 100644 --- a/docs/en/topics/data-types.md +++ b/docs/en/topics/data-types.md @@ -1,29 +1,29 @@ # Data Types -These are the data-types that you can use when defining your data objects. They are all subclasses of `[api:DBField]` +These are the data-types that you can use when defining your data objects. They are all subclasses of [api:DBField] for introducing their usage. ## Types -* `[api:Varchar]`: A variable-length string of up to 255 characters, designed to store raw text -* `[api:Text]`: A variable-length string of up to 2 megabytes, designed to store raw text -* `[api:HTMLVarchar]`: A variable-length string of up to 255 characters, designed to store HTML -* `[api:HTMLText]`: A variable-length string of up to 2 megabytes, designed to store HTML -* `[api:Enum]`: An enumeration of a set of strings -* `[api:Boolean]`: A boolean field. -* `[api:Int]`: An integer field. -* `[api:Decimal]`: A decimal number. -* `[api:Currency]`: A number with 2 decimal points of precision, designed to store currency values. -* `[api:Percentage]`: A decimal number between 0 and 1 that represents a percentage. -* `[api:Date]`: A date field -* `[api:SS_Datetime]`: A date / time field -* `[api:Time]`: A time field +* [api:Varchar]: A variable-length string of up to 255 characters, designed to store raw text +* [api:Text]: A variable-length string of up to 2 megabytes, designed to store raw text +* [api:HTMLVarchar]`: A variable-length string of up to 255 characters, designed to store HTML +* [api:HTMLText]: A variable-length string of up to 2 megabytes, designed to store HTML +* [api:Enum]: An enumeration of a set of strings +* [api:Boolean]: A boolean field. +* [api:Int]: An integer field. +* [api:Decimal]: A decimal number. +* [api:Currency]: A number with 2 decimal points of precision, designed to store currency values. +* [api:Percentage]: A decimal number between 0 and 1 that represents a percentage. +* [api:Date]: A date field +* [api:SS_Datetime]: A date / time field +* [api:Time]: A time field ## HTMLText vs. Text, and HTMLVarchar vs. Varchar -The database field types `[api:HTMLVarchar]` and `[api:Varchar]` are exactly the same in the database. However, the -templating engine knows to escape the `[api:Varchar]` field and not the `[api:HTMLVarchar]` field. So, it's important you +The database field types [api:HTMLVarchar] and [api:Varchar] are exactly the same in the database. However, the +templating engine knows to escape the [api:Varchar] field and not the [api:HTMLVarchar] field. So, it's important you use the right field if you don't want to be putting $FieldType.XML everywhere. If you're going to put HTML content into the field, please use the field type with the HTML prefix. Otherwise, you're diff --git a/docs/en/topics/datamodel.md b/docs/en/topics/datamodel.md index 4091c3f3b..5d361bb15 100644 --- a/docs/en/topics/datamodel.md +++ b/docs/en/topics/datamodel.md @@ -7,13 +7,13 @@ following connections: * Each database-row maps to a php-object * Each database-column maps to a property on a php-object -All data tables in SilverStripe are defined as subclasses of `[api:DataObject]`. Inheritance is supported in the data +All data tables in SilverStripe are defined as subclasses of [api:DataObject]. Inheritance is supported in the data model: seperate tables will be linked together, the data spread across these tables. The mapping and saving/loading logic is handled by sapphire, you don't need to worry about writing SQL most of the time. The advanced object-relational layer in SilverStripe is one of the main reasons for requiring PHP5. Most of its customizations are possible through [PHP5 Object -Overloading](http://www.onlamp.com/pub/a/php/2005/06/16/overloading.html) handled in the `[api:Object]`-class. +Overloading](http://www.onlamp.com/pub/a/php/2005/06/16/overloading.html) handled in the [api:Object]-class. See [database-structure](/reference/database-structure) for in-depth information on the database-schema. @@ -29,7 +29,7 @@ Note: You need to be logged in as an administrator to perform this command. ## Querying Data There are static methods available for querying data. They automatically compile the necessary SQL to query the database -so they are very helpful. In case you need to fall back to plain-jane SQL, have a look at `[api:SQLQuery]`. +so they are very helpful. In case you need to fall back to plain-jane SQL, have a look at [api:SQLQuery]. :::php $records = DataObject::get($obj, $filter, $sort, $join, $limit); @@ -46,7 +46,7 @@ so they are very helpful. In case you need to fall back to plain-jane SQL, have Passing a *$join* statement to DataObject::get will filter results further by the JOINs performed against the foreign table. **It will NOT return the additionally joined data.** The returned *$records* will always be a -`[api:DataObject]`. +[api:DataObject]. When using *$join* statements be sure the string is in the proper format for the respective database engine. In MySQL the use of back-ticks may be necessary when referring Table Names and potentially Columns. (see [MySQL @@ -188,7 +188,7 @@ on the "Player"-table. ); } -SilverStripe's `[api:SiteTree]` base-class for content-pages uses a 1-to-1 relationship to link to its +SilverStripe's [api:SiteTree] base-class for content-pages uses a 1-to-1 relationship to link to its parent element in the tree: :::php @@ -285,7 +285,7 @@ accessors available on both ends. ### Adding relations Inside sapphire it doesn't matter if you're editing a *has_many*- or a *many_many*-relationship. You need to get a -`[api:ComponentSet]`. +[api:ComponentSet]. :::php class Team extends DataObject { @@ -315,7 +315,7 @@ Inside sapphire it doesn't matter if you're editing a *has_many*- or a *many_man ### Custom Relation Getters You can use the flexible datamodel to get a filtered result-list without writing any SQL. For example, this snippet gets -you the "Players"-relation on a team, but only containing active players. (See `[api:DataObject::$has_many]` for more info on +you the "Players"-relation on a team, but only containing active players. (See [api:DataObject::$has_many] for more info on the described relations). :::php @@ -448,16 +448,16 @@ See [forms](/topics/forms). ### Saving data with custom SQL -See `[api:SQLQuery]` for custom *INSERT*, *UPDATE*, *DELETE* queries. +See [api:SQLQuery] for custom *INSERT*, *UPDATE*, *DELETE* queries. ## Decorating DataObjects -You can add properties and methods to existing `[api:DataObjects]`s like `[api:Member]` (a core class) without hacking core +You can add properties and methods to an existing [api:DataObjects] like [api:Member] (a core class) without hacking core code or subclassing. -Please see `[api:DataObjectDecorator]` for a general description, and `[api:Hierarchy]` for our most +Please see [api:DataObjectDecorator] for a general description, and [api:Hierarchy] for our most popular examples. @@ -466,7 +466,7 @@ popular examples. ### Whats the difference between DataObject::get() and a relation-getter? You can work with both in pretty much the same way, but relationship-getters return a special type of collection: -A `[api:ComponentSet]` with relation-specific functionality. +A [api:ComponentSet] with relation-specific functionality. :::php $myTeam = DataObject::get_by_id('Team',$myPlayer->TeamID); // returns DataObject diff --git a/docs/en/topics/debugging.md b/docs/en/topics/debugging.md index cd983e7ec..9e8778889 100644 --- a/docs/en/topics/debugging.md +++ b/docs/en/topics/debugging.md @@ -32,7 +32,7 @@ use devmode on a public server very very carefully Test mode is designed for staging environments or other private collaboration sites before deploying a site live. You do not need to use test mode if you do not have a staging environment or a place for testing which is on a public server) -In this mode error messages are hidden from the user and it includes `[api:BasicAuth]` integration if you want to password +In this mode error messages are hidden from the user and it includes [api:BasicAuth] integration if you want to password protect the site. To set your site to test mode set this in your `mysite/_config.php` file @@ -142,4 +142,4 @@ the development effort itself as "test-driven development". Silverstripe includes a profiling suite called [Profiler](http://www.adepteo.net/profiler/manual.html) from Carl Taylor at Adepteo. You can use this withing your installation during development to find bottlenecks and more. You can enable -the profiler by adding `?debug_profile=1` to your URL. \ No newline at end of file +the profiler by adding `?debug_profile=1` to your URL. diff --git a/docs/en/topics/directory-structure.md b/docs/en/topics/directory-structure.md index b4fe0ff5e..abc3c0711 100644 --- a/docs/en/topics/directory-structure.md +++ b/docs/en/topics/directory-structure.md @@ -55,7 +55,7 @@ Example Forum: ## PHP Include Paths -Due to the way `[api:ManifestBuilder]` recursively detects php-files and includes them through PHP5's +Due to the way [api:ManifestBuilder] recursively detects php-files and includes them through PHP5's *__autoload()*-feature, you don't need to worry about include paths. Feel free to structure your php-code into subdirectories inside the *code*-directory. diff --git a/docs/en/topics/email.md b/docs/en/topics/email.md index 35a84e10f..3cf2bab73 100644 --- a/docs/en/topics/email.md +++ b/docs/en/topics/email.md @@ -150,4 +150,4 @@ The [newsletter module](http://silverstripe.org/newsletter-module) provides a UI ## API Documentation -`[api:Email]` \ No newline at end of file +[api:Email] diff --git a/docs/en/topics/error-handling.md b/docs/en/topics/error-handling.md index c2deb2bde..f014e6813 100644 --- a/docs/en/topics/error-handling.md +++ b/docs/en/topics/error-handling.md @@ -36,11 +36,11 @@ warnings. An HTTP 500 error will be sent when there has been a fatal error on either a test or production site. You can make this friendlier - much like the 404 page, the error content can be edited within the CMS. -* Create a page of type `[api:ErrorPage]` +* Create a page of type [api:ErrorPage] * Set the error code to 500 * Publish the page. -**HOW IT WORKS: **The publication script for `[api:ErrorPage]` will write the full HTML content, including the template styling, +**HOW IT WORKS: **The publication script for [api:ErrorPage] will write the full HTML content, including the template styling, to assets/error-500.html. The fatal error handler looks for the presence of this file, and if it exists, dumps the content. This means that database access isn't required to provide a 500 error page. diff --git a/docs/en/topics/extending-the-cms.md b/docs/en/topics/extending-the-cms.md index a2007092f..e30b10879 100644 --- a/docs/en/topics/extending-the-cms.md +++ b/docs/en/topics/extending-the-cms.md @@ -49,12 +49,12 @@ where url is the relative link to the page (eg 'admin/categories'). You can chan ## Overloading EditForm -You may need to overload EditForm if your class does not use the `[api:Versioned]` extension. +You may need to overload EditForm if your class does not use the [api:Versioned] extension. ## Overloading SiteTreeAsUL The tree hints can sometimes cause problems when reorganising the tree, and the CMSMain::SiteTreeAsUL function uses -`[api:SiteTree]` explicitly. Use: +[api:SiteTree] explicitly. Use: :::php public function SiteTreeAsUL() { diff --git a/docs/en/topics/form-validation.md b/docs/en/topics/form-validation.md index 209cecd96..a78b028fe 100644 --- a/docs/en/topics/form-validation.md +++ b/docs/en/topics/form-validation.md @@ -6,8 +6,8 @@ Form validation is a combination of PHP and JavaScript ### Introduction -Validators are implemented as an argument to the `[api:Form]` constructor. You create a required fields validator like -so. In this case, we're creating a `[api:RequiredFields]` validator - the `[api:Validator]` class itself is an abstract +Validators are implemented as an argument to the [api:Form] constructor. You create a required fields validator like +so. In this case, we're creating a [api:RequiredFields] validator - the [api:Validator] class itself is an abstract class. @@ -74,4 +74,4 @@ Disable for a specific form: ## Related - * Model Validation with [api:DataObject->validate()] + * Model Validation with [api:DataObject::validate()] diff --git a/docs/en/topics/forms.md b/docs/en/topics/forms.md index 9b3a0cf39..1ec8f47e8 100644 --- a/docs/en/topics/forms.md +++ b/docs/en/topics/forms.md @@ -14,9 +14,9 @@ constructor takes the following arguments: * `$name`: This must be the name of the method on that controller that is called to return the form. The first two fields allow the form object to be re-created after submission. **It's vital that they are properly set - if you ever have problems with form action handler not working, check that these values are correct.** -* `$fields`: A `[api:FieldSet]`s that make up the editable portion of the form. -* `$actions`: A `[api:FieldSet]`s that make up the control portion of the form - the buttons at the bottom. -* `$validator`: An optional `[api:Validator]` for more information. +* `$fields`: A [api:FieldSet] that makes up the editable portion of the form. +* `$actions`: A [api:FieldSet] that makes up the control portion of the form - the buttons at the bottom. +* `$validator`: An optional [api:Validator] for more information. Example: @@ -60,16 +60,16 @@ The real difference, however, is that you can then define your controller method ## Form Field Types -There are many classes extending `[api:FormField]`. Some examples: +There are many classes extending [api:FormField]. Some examples: -* `[api:TextField]` -* `[api:EmailField]` -* `[api:NumericField]` -* `[api:DateField]` -* `[api:CheckboxField]` -* `[api:DropdownField]` -* `[api:OptionsetField]` -* `[api:CheckboxSetField]` +* [api:TextField] +* [api:EmailField] +* [api:NumericField] +* [api:DateField] +* [api:CheckboxField] +* [api:DropdownField] +* [api:OptionsetField] +* [api:CheckboxSetField] Full overview at [form-field-types](/reference/form-field-types) @@ -195,7 +195,7 @@ First of all, you need to create your form on it's own class, that way you can d } -`forTemplate()` tells the `[api:Form]` class to render with a template of return value of `$this->class`, which in this case +`forTemplate()` tells the [api:Form] class to render with a template of return value of `$this->class`, which in this case is *MyForm*, the name of the class. If the template doesn't exist, then it falls back to using Form.ss. *MyForm.ss* should then be placed into your *templates/Includes* directory for your project. Here is an example of @@ -235,7 +235,7 @@ this case `TextField->Field()` or `EmailField->Field()` which returns an `` instead of specifying each field manually, as we've done above. @@ -274,9 +274,9 @@ Adds a new text field called FavouriteColour next to the Content field in the CM ## Related * [form-field-types](/reference/form-field-types) -* `[api:FormField]` class +* [api:FormField] * [multiform module](http://silverstripe.org/multi-form-module) ## API Documentation -`[api:Form]` \ No newline at end of file +[api:Form] diff --git a/docs/en/topics/i18n.md b/docs/en/topics/i18n.md index eb95a164d..d4446e945 100644 --- a/docs/en/topics/i18n.md +++ b/docs/en/topics/i18n.md @@ -7,7 +7,7 @@ different languages based on your global settings and the preferences of your we as l10n (short for "localization"). For translating any content managed through the CMS or stored in the database, please refer to the -[translation](/topics/translation) documentation (which explains the `[api:Translatable]` extension). +[translation](/topics/translation) documentation (which explains the [api:Translatable] extension). This page aims to describe the low-level functionality of the i18n-API. It targets developers who: @@ -28,7 +28,7 @@ The i18n class is enabled by default. ### Setting the locale -To set the locale you just need to call `[api:i18n::set_locale()]` passing, as a parameter, the name of the locale that you +To set the locale you just need to call [api:i18n::set_locale()] passing, as a parameter, the name of the locale that you want to set. :::php @@ -44,7 +44,7 @@ available locales. ### Getting the locale -As you set the locale you can also get the current value, just by calling `[api:i18n::get_locale()]`. +As you set the locale you can also get the current value, just by calling [api:i18n::get_locale()]. ### Declaring the content language in HTML {#declaring_the_content_language_in_html} diff --git a/docs/en/topics/javascript.md b/docs/en/topics/javascript.md index a18479a56..b4a034bfe 100644 --- a/docs/en/topics/javascript.md +++ b/docs/en/topics/javascript.md @@ -9,9 +9,9 @@ practices can be applied to other libraries as well. ## File Inclusion -SilverStripe-driven code should use the `[api:Requirements]` class to manage clientside dependencies like CSS and JavaScript +SilverStripe-driven code should use the [api:Requirements] class to manage clientside dependencies like CSS and JavaScript files, rather than including `