Last active
July 20, 2016 02:46
-
-
Save xtfer/789fd7c6f4ccc265e1eb to your computer and use it in GitHub Desktop.
Ghost: Page Controller hook_menu example
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 | |
* Page Controller example for Ghost | |
* | |
* @license GPL v2 http://www.fsf.org/licensing/licenses/gpl.html | |
* @author Chris Skene chris at previousnext dot com dot au | |
* @copyright Copyright(c) 2014 Previous Next Pty Ltd | |
*/ | |
/** | |
* Implements hook_menu(). | |
*/ | |
function ghost_examples_menu() { | |
$menu = array(); | |
$menu['my/page/callback'] = array( | |
// Your page arguments should start with your Controller, and the method to call. | |
'page callback' => '\Drupal\\ghost\\Page\\PageController::createPage', | |
'page arguments' => array( | |
'\Drupal\\ghost_examples\\Page\\PageControllerExample', | |
'myPageControllerViewCallback', | |
), | |
); | |
return $menu; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment