Skip to content

Instantly share code, notes, and snippets.

@webkenny
Created October 18, 2016 11:19
Show Gist options
  • Save webkenny/4f347d33ed93f40b824833be47ddc726 to your computer and use it in GitHub Desktop.
Save webkenny/4f347d33ed93f40b824833be47ddc726 to your computer and use it in GitHub Desktop.
Simple Module
name: IHM Premiere Prep Cart
description: Powers the My Cart functionality of Premiere Prep.
package: Custom
type: module
core: 8.x
dependencies:
- entityqueue:entityqueue
- drupal:views
configure: prepcart.settings
prepcart.content:
path: '/cart'
defaults:
_controller: '\Drupal\prepcart\Controller\PrepCartController::content'
_title: 'Hello Cart'
requirements:
_permission: 'access content'
<?php
/**
* @file
* Contains \Drupal\prepcart\Controller\PrepCartController.
*/
namespace Drupal\prepcart\Controller;
use Drupal\Core\Controller\ControllerBase;
class PrepCartController extends ControllerBase {
public function content() {
return array(
'#type' => 'markup',
'#markup' => $this->t('Hello, IHM!'),
);
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment