Skip to content

Commit

Permalink
trailing spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Feb 2, 2017
1 parent 2382ca3 commit abcae19
Show file tree
Hide file tree
Showing 13 changed files with 30 additions and 30 deletions.
4 changes: 2 additions & 2 deletions en/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions en/directory-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions en/element-queries.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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
Expand Down
20 changes: 10 additions & 10 deletions en/element-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -93,15 +93,15 @@ 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'),
'{{%products}}', 'id', '{{%elements}}', 'id', 'CASCADE', null);
}
```

> {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.

Expand All @@ -126,7 +126,7 @@ public function afterSave(bool $isNew)
], ['id' => $this->id])
->execute();
}

parent::afterSave($isNew);
}
```
Expand Down Expand Up @@ -272,7 +272,7 @@ public function getEditorHtml(): string
'required' => true
]
]);

// ...

$html .= parent::getEditorHtml();
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -717,7 +717,7 @@ use craft\db\Query;
use craft\elements\User;
use craft\helpers\ArrayHelper;

// ...
// ...

public static function eagerLoadingMap(array $sourceElements, string $handle)
{
Expand Down
2 changes: 1 addition & 1 deletion en/field-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
<?php
Expand Down
2 changes: 1 addition & 1 deletion en/plugin-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The main benefits of Craft Plugins over Yii Modules are:

## Getting Started

> {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

Expand Down
6 changes: 3 additions & 3 deletions en/plugin-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class Settings extends \craft\base\Model
{
public $foo = 'defaultFooValue';
public $bar = 'defaultBarValue';

public function rules()
{
return [
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion en/resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ use ns\prefix\FooBundle;
public function actionFoo()
{
$this->view->registerAssetBundle(FooBundle::class);

return $this->renderTemplate('pluginHandle/foo');
}
```
Expand Down
4 changes: 2 additions & 2 deletions en/updating-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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();
Expand Down
6 changes: 3 additions & 3 deletions en/upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion en/utility-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
<?php
Expand Down
2 changes: 1 addition & 1 deletion en/volume-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ You can refer to Craft’s own volume classes for examples. They are located in

## Registering Custom Volume Types

Once you have created your volume class, you will need to register it with the Volumes service, so Craft will know about it when populating the list of available volume types:
Once you have created your volume class, you will need to register it with the Volumes service, so Craft will know about it when populating the list of available volume types:

```php
<?php
Expand Down
2 changes: 1 addition & 1 deletion en/widget-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ You can refer to Craft’s own widget classes for examples. They are located in

## Registering Custom Widget Types

Once you have created your widget class, you will need to register it with the Dashboard service, so Craft will know about it when populating the list of available widget types:
Once you have created your widget class, you will need to register it with the Dashboard service, so Craft will know about it when populating the list of available widget types:

```php
<?php
Expand Down

0 comments on commit abcae19

Please sign in to comment.