Use prism for code syntax highlighting

This commit is contained in:
Oliver Davies 2017-03-16 08:09:52 +00:00
parent 356c9dca43
commit adf3c67355
54 changed files with 471 additions and 324 deletions

View file

@ -21,7 +21,7 @@ It supports both the [PSR-0][3] and [PSR-4][4] standards, as well as providing a
To use it, download and enable it from Drupal.org as you would for any other module, and then add it as a dependency within your module. The xautoload project page suggests including a minimum version in this format:
```ini
```language-ini
dependencies[] = xautoload (>= 7.x-5.0)
```
@ -33,7 +33,7 @@ This will ensure that the version of xautoload is 7.x-5.0 or newer.
Here is an example .info file for a migrate module.
```ini
```language-ini
; foo_migrate.info
name = Foo Migration
@ -49,7 +49,7 @@ In this example, each custom migration class is stored in its own file within
One thing that the xautoload module does to enable for the use of wildcards within this syntax. By using wildcards, the module file can be simplified as follows:
```
```language-ini
files[] = includes/**/*.inc
```
@ -72,7 +72,7 @@ In order to do so, youll need to complete the following steps:
Now your class may look something like this:
```php
```language-php
<?php
namespace Drupal\foo_migrate\Node;
@ -88,7 +88,7 @@ With these steps completed, any imports within your .info file can be removed as
Within `foo_migrate.migrate.inc`, I can now reference any class names using their full namespace:
```php
```language-php
$node_arguments['ArticleNode'] = array(
'class_name' => 'Drupal\foo_migrate\Node\FooArticleNodeMigration',
'source_type' => 'story',