Last active
August 26, 2016 19:47
-
-
Save heddn/3a5ddf18baae377d2a1ca76cd6c96e82 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
{{ drupal_block('resource_links_introduction') }} | |
<h2> {% trans %}Resources by Type{% endtrans %}</h2> | |
<div class="match-height col-sm-6"> | |
<h4>Type of links:</h4> | |
{{ drupal_block('views_block__resource_links_block_1') }} | |
</div> | |
<div class="match-height col-sm-6"> | |
{{ drupal_block('resource_links_instruction') }} | |
</div> |
This file contains hidden or 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 | |
use Drupal\Core\Routing\RouteMatchInterface; | |
/** | |
* Implements hook_help(). | |
*/ | |
function custom_module_help($route_name, RouteMatchInterface $route_match) { | |
switch ($route_name) { | |
// Main module help for the custom_module module. | |
case 'help.page.custom_module': | |
$output = ''; | |
$output .= '<h3>' . t('About') . '</h3>'; | |
$output .= '<p>' . t('The Custo module provides custom configuration') . '</p>'; | |
return $output; | |
default: | |
} | |
} | |
/** | |
* Implements hook_theme(). | |
*/ | |
function custom_module_theme($existing, $type, $theme, $path) { | |
return [ | |
'custom_resource_links' => [ | |
'variables' => [], | |
], | |
]; | |
} |
This file contains hidden or 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 | |
namespace Drupal\custom_module\Controller; | |
use Drupal\Core\Controller\ControllerBase; | |
/** | |
* Class ResourceLinks. | |
* | |
* @package Drupal\custom_module\Controller | |
*/ | |
class ResourceLinks extends ControllerBase { | |
/** | |
* Page. | |
* | |
* @return array | |
* Render array for the page | |
*/ | |
public function page() { | |
return [ | |
'#theme' => 'custom_resource_links', | |
]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment