Commit eb1eb29f authored by Gorodkov Denis's avatar Gorodkov Denis

commit

parent 41fba985
mymodule.node.swapi:
route_name : mymdoule.test
title: Swapi
base_route: entity.node.canonical
......@@ -69,7 +69,3 @@ function mymodule_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_
$form["actions"]["reset"]["#access"] = true;
}
}
function mymodule_preprocess_page() {
}
......@@ -4,3 +4,10 @@ mymodule.batch_form:
_form: '\Drupal\mymodule\Form\BatchForm'
requirements:
_permission: 'administer site configuration'
mymdoule.test:
path: '/node/{node}/swapi'
defaults:
_controller: '\Drupal\mymodule\Controller\SwapiLinkTask::exampleTabContent'
_title_callback: '\Drupal\Core\Entity\Controller\EntityController::title'
requirements:
_permission: 'administer content types'
<?php
namespace Drupal\mymodule\Controller;
use Drupal\Core\Controller\ControllerBase;
use Drupal\node\NodeInterface;
use Drupal\Core\Access\AccessResult;
class SwapiLinkTask extends ControllerBase {
public function exampleTabContent() {
return ['#markup' => 'Content from swapi'];
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment