|
@@ -0,0 +1,35 @@
|
|
|
|
+<?php
|
|
|
|
+
|
|
|
|
+namespace Drupal\materio_home\Controller;
|
|
|
|
+
|
|
|
|
+use Drupal\Core\Controller\ControllerBase;
|
|
|
|
+use Drupal\Core\Datetime\DrupalDateTime;
|
|
|
|
+use Drupal\taxonomy\Entity\Term;
|
|
|
|
+use Drupal\workflow\Entity\WorkflowManager;
|
|
|
|
+use Drupal\Core\Url;
|
|
|
|
+use Drupal\Core\Language\LanguageInterface;
|
|
|
|
+// use Symfony\Component\HttpFoundation\JsonResponse;
|
|
|
|
+use Drupal\Core\Cache\CacheableJsonResponse;
|
|
|
|
+use Drupal\Core\Cache\CacheableMetadata;
|
|
|
|
+use Drupal\core\render\RenderContext;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+class HomeController extends ControllerBase {
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * Display home as a page.
|
|
|
|
+ *
|
|
|
|
+ * @return renderable array
|
|
|
|
+ */
|
|
|
|
+ public function home() {
|
|
|
|
+
|
|
|
|
+ // $view_builder = \Drupal::entityTypeManager()->getViewBuilder('node');
|
|
|
|
+
|
|
|
|
+ $contents = array("#theme"=>'materio_home');
|
|
|
|
+
|
|
|
|
+ return $contents;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+}
|