Last active
February 4, 2016 22:47
-
-
Save jmolivas/950addf854ad750a52f1 to your computer and use it in GitHub Desktop.
Module of the week
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
example.hello_controller_hello: | |
path: 'example/hello/{name}' | |
defaults: | |
_controller: '\Drupal\example\Controller\HelloController::hello' | |
_title: 'Hello' | |
requirements: | |
_permission: 'access content' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @file | |
* Contains \Drupal\example\Controller\HelloController. | |
*/ | |
namespace Drupal\example\Controller; | |
use Drupal\Core\Controller\ControllerBase; | |
/** | |
* Class HelloController. | |
* | |
* @package Drupal\example\Controller | |
*/ | |
class HelloController extends ControllerBase { | |
/** | |
* Hello. | |
* | |
* @return string | |
* Return Hello string. | |
*/ | |
public function hello($name) { | |
return [ | |
'#type' => 'markup', | |
'#markup' => $this->t("Implement method: hello with parameter(s): $name") | |
]; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commands: | |
# Download Drupal | |
- command: site:new | |
arguments: | |
directory: drupal8.dev | |
version: 8.0.3 | |
# Install Drupal | |
- command: site:install | |
options: | |
langcode: en | |
db-type: sqlite | |
db-file: sites/default/files/.ht.sqlite | |
site-name: 'Drupal 8 Quick Start' | |
site-mail: [email protected] | |
account-name: admin | |
account-mail: [email protected] | |
account-pass: admin | |
arguments: | |
profile: standard | |
# Start php built-in server | |
- command: server |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment