From 76bc7524a7b1dc8c29519711fe5d702145da2d8b Mon Sep 17 00:00:00 2001 From: mattclegg Date: Tue, 28 Apr 2020 17:47:48 +0545 Subject: [PATCH 1/3] DOCS: Fix typos & grammer --- .../02_Developer_Guides/01_Templates/03_Requirements.md | 2 +- docs/en/02_Developer_Guides/14_Files/02_Images.md | 4 +--- src/ORM/ArrayList.php | 6 +++--- src/ORM/DataList.php | 2 +- src/ORM/Filterable.php | 8 ++++---- src/ORM/ListDecorator.php | 6 +++--- 6 files changed, 13 insertions(+), 15 deletions(-) diff --git a/docs/en/02_Developer_Guides/01_Templates/03_Requirements.md b/docs/en/02_Developer_Guides/01_Templates/03_Requirements.md index 1b8c57cd5..bcc472540 100644 --- a/docs/en/02_Developer_Guides/01_Templates/03_Requirements.md +++ b/docs/en/02_Developer_Guides/01_Templates/03_Requirements.md @@ -437,7 +437,7 @@ Requirements::set_write_js_to_body(false); ## Direct resource urls -In templates you can use the `$resourcePath()` or `$resourceURL()` helper methods to inject links to +In templates, you can use the `$resourcePath()` or `$resourceURL()` helper methods to inject links to resources directly. If you want to link to resources within a specific module you can use the `vendor/module:some/path/to/file.jpg` syntax. diff --git a/docs/en/02_Developer_Guides/14_Files/02_Images.md b/docs/en/02_Developer_Guides/14_Files/02_Images.md index cd7504c5c..da0e0761e 100644 --- a/docs/en/02_Developer_Guides/14_Files/02_Images.md +++ b/docs/en/02_Developer_Guides/14_Files/02_Images.md @@ -212,9 +212,7 @@ SilverStripe\Core\Injector\Injector: ## Storage -Manipulated images are stored as "file variants" in the same -folder structure as the original image. The storage mechanism is described -in the ["File Storage" guide](file_storage). +Manipulated images are stored as "file variants" in the same folder structure as the original image. The storage mechanism is described in the ["File Storage" guide](file_storage). ## API Documentation diff --git a/src/ORM/ArrayList.php b/src/ORM/ArrayList.php index d923dda29..06bf59bab 100644 --- a/src/ORM/ArrayList.php +++ b/src/ORM/ArrayList.php @@ -604,7 +604,7 @@ class ArrayList extends ViewableData implements SS_List, Filterable, Sortable, L } /** - * Filter the list to include items with these charactaristics + * Filter the list to include items with these characteristics * * @return ArrayList * @see SS_List::filter() @@ -642,7 +642,7 @@ class ArrayList extends ViewableData implements SS_List, Filterable, Sortable, L } /** - * Return a copy of this list which contains items matching any of these charactaristics. + * Return a copy of this list which contains items matching any of these characteristics. * * @example // only bob in the list * $list = $list->filterAny('Name', 'bob'); @@ -765,7 +765,7 @@ class ArrayList extends ViewableData implements SS_List, Filterable, Sortable, L } /** - * Exclude the list to not contain items with these charactaristics + * Exclude the list to not contain items with these characteristics * * @return ArrayList * @see SS_List::exclude() diff --git a/src/ORM/DataList.php b/src/ORM/DataList.php index b017c110c..cbd247606 100644 --- a/src/ORM/DataList.php +++ b/src/ORM/DataList.php @@ -422,7 +422,7 @@ class DataList extends ViewableData implements SS_List, Filterable, Sortable, Li } /** - * Return a copy of this list which contains items matching any of these charactaristics. + * Return a copy of this list which contains items matching any of these characteristics. * * @example // only bob in the list * $list = $list->filterAny('Name', 'bob'); diff --git a/src/ORM/Filterable.php b/src/ORM/Filterable.php index 4686d432c..c8d907861 100644 --- a/src/ORM/Filterable.php +++ b/src/ORM/Filterable.php @@ -22,7 +22,7 @@ interface Filterable extends SS_List public function canFilterBy($by); /** - * Return a new instance of this list that only includes items with these charactaristics + * Return a new instance of this list that only includes items with these characteristics * * @return Filterable * @example $list = $list->filter('Name', 'bob'); // only bob in the list @@ -35,7 +35,7 @@ interface Filterable extends SS_List public function filter(); /** - * Return a copy of this list which contains items matching any of these charactaristics. + * Return a copy of this list which contains items matching any of these characteristics. * * @example // only bob in the list * $list = $list->filterAny('Name', 'bob'); @@ -59,7 +59,7 @@ interface Filterable extends SS_List public function filterAny(); /** - * Return a new instance of this list that excludes any items with these charactaristics + * Return a new instance of this list that excludes any items with these characteristics * * @return Filterable * @example $list = $list->exclude('Name', 'bob'); // exclude bob from list @@ -72,7 +72,7 @@ interface Filterable extends SS_List public function exclude(); /** - * Return a new instance of this list that excludes any items with these charactaristics + * Return a new instance of this list that excludes any items with these characteristics * Filter this List by a callback function. The function will be passed each record of the List in turn, * and must return true for the record to be included. Returns the filtered list. * diff --git a/src/ORM/ListDecorator.php b/src/ORM/ListDecorator.php index 8620168ff..64d9e613c 100644 --- a/src/ORM/ListDecorator.php +++ b/src/ORM/ListDecorator.php @@ -182,7 +182,7 @@ abstract class ListDecorator extends ViewableData implements SS_List, Sortable, } /** - * Filter the list to include items with these charactaristics + * Filter the list to include items with these characteristics * * @example $list->filter('Name', 'bob'); // only bob in list * @example $list->filter('Name', array('aziz', 'bob'); // aziz and bob in list @@ -195,7 +195,7 @@ abstract class ListDecorator extends ViewableData implements SS_List, Sortable, } /** - * Return a copy of this list which contains items matching any of these charactaristics. + * Return a copy of this list which contains items matching any of these characteristics. * * @example // only bob in the list * $list = $list->filterAny('Name', 'bob'); @@ -275,7 +275,7 @@ abstract class ListDecorator extends ViewableData implements SS_List, Sortable, } /** - * Exclude the list to not contain items with these charactaristics + * Exclude the list to not contain items with these characteristics * * @example $list->exclude('Name', 'bob'); // exclude bob from list * @example $list->exclude('Name', array('aziz', 'bob'); // exclude aziz and bob from list From df8cb9e0100a663ecc437ac837512da1c185c47a Mon Sep 17 00:00:00 2001 From: mattclegg Date: Tue, 28 Apr 2020 17:48:21 +0545 Subject: [PATCH 2/3] DOCS: Update `filter` to use correct class --- src/ORM/ArrayList.php | 2 +- src/ORM/DataList.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ORM/ArrayList.php b/src/ORM/ArrayList.php index 06bf59bab..6d60d3e13 100644 --- a/src/ORM/ArrayList.php +++ b/src/ORM/ArrayList.php @@ -607,7 +607,7 @@ class ArrayList extends ViewableData implements SS_List, Filterable, Sortable, L * Filter the list to include items with these characteristics * * @return ArrayList - * @see SS_List::filter() + * @see Filterable::filter() * @example $list->filter('Name', 'bob'); // only bob in the list * @example $list->filter('Name', array('aziz', 'bob'); // aziz and bob in list * @example $list->filter(array('Name'=>'bob, 'Age'=>21)); // bob with the Age 21 in list diff --git a/src/ORM/DataList.php b/src/ORM/DataList.php index cbd247606..b494c7441 100644 --- a/src/ORM/DataList.php +++ b/src/ORM/DataList.php @@ -365,7 +365,7 @@ class DataList extends ViewableData implements SS_List, Filterable, Sortable, Li /** * Return a copy of this list which only includes items with these characteristics * - * @see SS_List::filter() + * @see Filterable::filter() * * @example $list = $list->filter('Name', 'bob'); // only bob in the list * @example $list = $list->filter('Name', array('aziz', 'bob'); // aziz and bob in list From dbecdd52d2fff92d599946421dbd68c868a473e4 Mon Sep 17 00:00:00 2001 From: mattclegg Date: Tue, 28 Apr 2020 17:51:25 +0545 Subject: [PATCH 3/3] DOCS: Add reference for undocumented TEMP_FOLDER --- src/includes/constants.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/includes/constants.php b/src/includes/constants.php index 783114748..591f22f05 100644 --- a/src/includes/constants.php +++ b/src/includes/constants.php @@ -15,7 +15,8 @@ use SilverStripe\Core\TempFolder; * - BASE_URL: Full URL to the webroot, e.g. "http://my-host.com/my-webroot" (no trailing slash). * - BASE_PATH: Absolute path to the webroot, e.g. "/var/www/my-webroot" (no trailing slash). * See Director::baseFolder(). Can be overwritten by Config::modify()->set(Director::class, 'alternate_base_folder', ). - * - TEMP_PATH: Absolute path to temporary folder, used for manifest and template caches. Example: "/var/tmp" + * - TEMP_PATH: Absolute path to temporary folder, used as base for $TEMP_FOLDER. Example: "/var/tmp" + * - TEMP_FOLDER: folder name for manifest and template caches. Example: "silverstripe-cache-php7.2" * See getTempFolder(). No trailing slash. * - ASSETS_DIR: Dir for assets folder. e.g. "assets" * - ASSETS_PATH: Full path to assets folder. e.g. "/var/www/my-webroot/assets"