From abcae19f1bf95881ffbc9166e1da59f7dc74b6ee Mon Sep 17 00:00:00 2001 From: brandonkelly Date: Thu, 2 Feb 2017 10:46:30 -0800 Subject: [PATCH] trailing spaces --- en/configuration.md | 4 ++-- en/directory-structure.md | 4 ++-- en/element-queries.md | 4 ++-- en/element-types.md | 20 ++++++++++---------- en/field-types.md | 2 +- en/plugin-intro.md | 2 +- en/plugin-settings.md | 6 +++--- en/resources.md | 2 +- en/updating-plugins.md | 4 ++-- en/upgrade.md | 6 +++--- en/utility-types.md | 2 +- en/volume-types.md | 2 +- en/widget-types.md | 2 +- 13 files changed, 30 insertions(+), 30 deletions(-) diff --git a/en/configuration.md b/en/configuration.md index d502ec2..9059001 100644 --- a/en/configuration.md +++ b/en/configuration.md @@ -42,7 +42,7 @@ If you’re using APC, Database, File, or Memcache(d) data caching drivers (per ## Guzzle Config Craft uses [Guzzle 6](http://docs.guzzlephp.org/en/latest/) whenever creating HTTP requests, such as: - + - when checking for Craft updates - when sending in a support request from the Craft Support widget - when loading RSS feeds from the Feeds widget @@ -119,7 +119,7 @@ These `.json` files must contain **valid JSON**. That means: ## Application Config -You can customize Craft’s entire [application configuration](http://www.yiiframework.com/doc-2.0/guide-structure-applications.html#application-configurations) from `config/app.php`. Any items returned by that array will get merged into the main application configuration array. +You can customize Craft’s entire [application configuration](http://www.yiiframework.com/doc-2.0/guide-structure-applications.html#application-configurations) from `config/app.php`. Any items returned by that array will get merged into the main application configuration array. ### Mailer Component diff --git a/en/directory-structure.md b/en/directory-structure.md index 00f54cf..f13faff 100644 --- a/en/directory-structure.md +++ b/en/directory-structure.md @@ -3,7 +3,7 @@ Directory Structure When a Craft project is initiated using the [`craftcms/craft`](https://github.com/craftcms/craft) Composer project, it will have the following files and directories: -#### `config/` +#### `config/` Holds all of your Craft and plugin [configuration files](configuration.md), as well as your `license.key` file. @@ -19,7 +19,7 @@ Some of the folders you might find in there include: - `runtime/` – Pretty much everything in here is there for caching and logging purposes. Nothing that Craft couldn’t live without, if the folder happened to get deleted. For the curious, here are the types of things you will find in craft/storage/runtime (though this is not a comprehensive list): - + - `assets/` – Stores image thumbnails, resized file icons, and copies of images stored on remote asset sources, to save Craft an HTTP request when it needs the images to generate new thumbnails or transforms. - `cache/` – Stores data caches. - `compiled_classes/` – Stores some dynamically-defined PHP classes. diff --git a/en/element-queries.md b/en/element-queries.md index 2b40229..d808648 100644 --- a/en/element-queries.md +++ b/en/element-queries.md @@ -1,7 +1,7 @@ Element Queries =============== -Element queries are [query builders](http://www.yiiframework.com/doc-2.0/guide-db-query-builder.html) that are tuned for fetching elements in Craft. They have several custom parameters, and they abstract away all the complexities of the actual SQL query needed to fetch the elements. Rather than raw data, they return element models. +Element queries are [query builders](http://www.yiiframework.com/doc-2.0/guide-db-query-builder.html) that are tuned for fetching elements in Craft. They have several custom parameters, and they abstract away all the complexities of the actual SQL query needed to fetch the elements. Rather than raw data, they return element models. ## Creating Element Queries @@ -280,7 +280,7 @@ $uri = Entry::find() ### Aggregate Methods -The following methods will run an aggregate method on the first column of matching elements, and return the result: +The following methods will run an aggregate method on the first column of matching elements, and return the result: - `sum()` – Returns the sum of all the values in the first column - `average()` – Returns the average number of all the values in the first column diff --git a/en/element-types.md b/en/element-types.md index 9acd7a2..6962a66 100644 --- a/en/element-types.md +++ b/en/element-types.md @@ -62,12 +62,12 @@ use craft\base\Element; class Product extends Element { /** - * @var int Price + * @var int Price */ public $price = 0; /** - * @var string Currency code + * @var string Currency code */ public $currency; @@ -93,7 +93,7 @@ if (!$this->db->tableExists('{{%products}}')) { 'uid' => $this->uid(), 'PRIMARY KEY(id)', ]); - + // give it a FK to the elements table $this->addForeignKey( $this->db->getForeignKeyName('{{%products}}', 'id'), @@ -101,7 +101,7 @@ if (!$this->db->tableExists('{{%products}}')) { } ``` -> {note} If you’re adding this as an update to an existing plugin, you will need to create a new normal migration as well, and copy the same code into it. +> {note} If you’re adding this as an update to an existing plugin, you will need to create a new normal migration as well, and copy the same code into it. Install the plugin now, so your database table will be created. @@ -126,7 +126,7 @@ public function afterSave(bool $isNew) ], ['id' => $this->id]) ->execute(); } - + parent::afterSave($isNew); } ``` @@ -272,7 +272,7 @@ public function getEditorHtml(): string 'required' => true ] ]); - + // ... $html .= parent::getEditorHtml(); @@ -308,7 +308,7 @@ Craft::$app->getFields()->saveLayout($fieldLayout); ``` Rather than only having one field layout for your entire element type, you can also manage multiple field layouts, if needed. For example, entry field layouts are defined for each entry type; asset field layouts are defined for each asset volume, etc. - + You can set that up however you want. When saving field layouts, make sure to delete the old one by its ID rather than by your element type (`craft\services\Fields::deleteLayoutById()`), and store new field layouts’ IDs in the database somewhere. As far as your element class is concerned, you will need to override the `getFieldLayout()` method, so elements know which field layout they should be associated with: @@ -404,7 +404,7 @@ protected static function defineSources(string $context = null): array } ``` -When a source is selected, Craft will configure your [element query](#element-query-class) with the values listed in the source’s `criteria` array. +When a source is selected, Craft will configure your [element query](#element-query-class) with the values listed in the source’s `criteria` array. ## Index Page @@ -463,7 +463,7 @@ protected static function defineTableAttributes(): array > {note} The first attribute you list here is a special case. It defines the header for the first column in the table view, which is the only one admins can’t remove. Its values will be the element representations, which is also not customizable. -If it’s a big list, you can also limit which columns should be visible by default for new [sources](#sources) by adding a protected `defineDefaultTableAttributes()` method to your element class: +If it’s a big list, you can also limit which columns should be visible by default for new [sources](#sources) by adding a protected `defineDefaultTableAttributes()` method to your element class: ```php protected static function defineDefaultTableAttributes(string $source): array @@ -717,7 +717,7 @@ use craft\db\Query; use craft\elements\User; use craft\helpers\ArrayHelper; -// ... +// ... public static function eagerLoadingMap(array $sourceElements, string $handle) { diff --git a/en/field-types.md b/en/field-types.md index 365270a..bc97211 100644 --- a/en/field-types.md +++ b/en/field-types.md @@ -9,7 +9,7 @@ You can refer to Craft’s own field classes for examples. They are located in ` ## Registering Custom Field Types -Once you have created your field class, you will need to register it with the Fields service, so Craft will know about it when populating the list of available field types: +Once you have created your field class, you will need to register it with the Fields service, so Craft will know about it when populating the list of available field types: ```php {tip} Use [pluginfactory.io] to create your plugin’s scaffolding with just a few clicks. +> {tip} Use [pluginfactory.io] to create your plugin’s scaffolding with just a few clicks. ### Preparation diff --git a/en/plugin-settings.md b/en/plugin-settings.md index 8495139..1a6629c 100644 --- a/en/plugin-settings.md +++ b/en/plugin-settings.md @@ -63,7 +63,7 @@ class Settings extends \craft\base\Model { public $foo = 'defaultFooValue'; public $bar = 'defaultBarValue'; - + public function rules() { return [ @@ -119,14 +119,14 @@ class Plugin extends \craft\base\Plugin 'settings' => $this->getSettings() ]); } - + // ... } ``` With all that in place, your plugin will now get its own icon on the Settings page, and a cog icon in its row on the Settings → Plugins page, which will link to `/admin/settings/plugin-handle`. -> {tip} That `plugin-handle` segment is your plugin handle, converted from `camelCase` to `kebab-case`. +> {tip} That `plugin-handle` segment is your plugin handle, converted from `camelCase` to `kebab-case`. ### Advanced Settings Pages diff --git a/en/resources.md b/en/resources.md index 235f8f1..9f379e3 100644 --- a/en/resources.md +++ b/en/resources.md @@ -79,7 +79,7 @@ use ns\prefix\FooBundle; public function actionFoo() { $this->view->registerAssetBundle(FooBundle::class); - + return $this->renderTemplate('pluginHandle/foo'); } ``` diff --git a/en/updating-plugins.md b/en/updating-plugins.md index 79cab43..b33f97e 100644 --- a/en/updating-plugins.md +++ b/en/updating-plugins.md @@ -693,7 +693,7 @@ Craft::$app->view->renderTemplate('pluginHandle/path/to/template', $variables); ### Controller Action Templates Controllers’ `renderTemplate()` method hasn’t changed much. The only difference is that it used to output the template and end the request for you, whereas now it returns the rendered template, which your controller action should return. - + ```php // Old: $this->renderTemplate('pluginHandle/path/to/template', $variables); @@ -705,7 +705,7 @@ return $this->renderTemplate('pluginHandle/path/to/template', $variables); ### Rendering Plugin Templates on Front End Requests If you want to render a plugin-supplied template on a front-end request, you need to set the View component to the CP’s template mode: - + ```php // Old: $oldPath = craft()->templates->getTemplatesPath(); diff --git a/en/upgrade.md b/en/upgrade.md index 0d5e866..3a6330a 100644 --- a/en/upgrade.md +++ b/en/upgrade.md @@ -58,7 +58,7 @@ Once everything’s in order, follow these steps to update Craft: composer require craftcms/cms:~3.0.0-beta.1 - > {tip} If Composer complains that your system doesn’t have PHP 7 installed, but you know it’s not an issue because Craft will run with a different PHP install (e.g. through MAMP or Vagrant), use the `--ignore-platform-reqs` flag. + > {tip} If Composer complains that your system doesn’t have PHP 7 installed, but you know it’s not an issue because Craft will run with a different PHP install (e.g. through MAMP or Vagrant), use the `--ignore-platform-reqs` flag. 4. Then run the following command to install the Craft plugin installer for Composer: @@ -141,7 +141,7 @@ return [ #### Asset Volume Settings -Craft 3 makes it possible to completely override all asset volume settings, not just the File System Path and URL settings for “Local” volumes. See [Overriding Volume Settings](configuration.md#overriding-volume-settings) on the Configuration page for more info. +Craft 3 makes it possible to completely override all asset volume settings, not just the File System Path and URL settings for “Local” volumes. See [Overriding Volume Settings](configuration.md#overriding-volume-settings) on the Configuration page for more info. ### Redactor Configs @@ -617,7 +617,7 @@ The `csrfInput()` function is provided as a shortcut. ## Memcache -If you are using `memcache` for your [cacheMethod](https://craftcms.com/docs/config-settings#cacheMethod) config setting and you did not have `useMemcached` set to `true` in your `craft/config/memcache.php` config file, you'll need to install memcached on your server. Craft 3 will only use it because there is not a PHP 7 compatible version of memcache available. +If you are using `memcache` for your [cacheMethod](https://craftcms.com/docs/config-settings#cacheMethod) config setting and you did not have `useMemcached` set to `true` in your `craft/config/memcache.php` config file, you'll need to install memcached on your server. Craft 3 will only use it because there is not a PHP 7 compatible version of memcache available. ## Plugins diff --git a/en/utility-types.md b/en/utility-types.md index b571d79..5381e34 100644 --- a/en/utility-types.md +++ b/en/utility-types.md @@ -9,7 +9,7 @@ You can refer to Craft’s own utility classes for examples. They are located in ## Registering Custom Utility Types -Once you have created your utility class, you will need to register it with the Utilities service, so Craft will know about it when populating the list of available utility types: +Once you have created your utility class, you will need to register it with the Utilities service, so Craft will know about it when populating the list of available utility types: ```php