Skip to content

Commit

Permalink
Adding hook for hax-blox definition
Browse files Browse the repository at this point in the history
  • Loading branch information
mlsamuelson committed Jun 6, 2018
1 parent 6dc5714 commit de03cf3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Controller/HaxController.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,16 @@ public function loadAppStore($token) {
if (\Drupal::csrfToken()->validate($token)) {

// Hooks and alters.
// Add/alter apps.
$appStore = \Drupal::moduleHandler()->invokeAll('hax_app_store');
\Drupal::moduleHandler()->alter('hax_app_store', $appStore);
// Add/alter templates. For reference, see appstore.json in
// libraries/webcomponents/polymer/bower_components/hax-body/demo/
$staxList = \Drupal::moduleHandler()->invokeAll('hax_stax');
\Drupal::moduleHandler()->alter('hax_stax', $staxList);
// Add/alter layouts.
$bloxList = \Drupal::moduleHandler()->invokeAll('hax_blox');
\Drupal::moduleHandler()->alter('hax_blox', $bloxList);

// Send the Response object with Apps and StaxList.
$response = new Response();
Expand All @@ -236,6 +242,7 @@ public function loadAppStore($token) {
'status' => 200,
'apps' => $appStore,
'stax' => $staxList,
'blox' => $bloxList,
]));

return $response;
Expand Down

0 comments on commit de03cf3

Please sign in to comment.