Problem/Motivation

One of the targets with the Social API is to have one single configuration environment for social-networking-related tasks. We need to define how the paths, menu links, etc. must be used.

Proposed resolution

Propose a set of rules that the Social API and sub-modules must have.

CommentFileSizeAuthor
#2 social-api-admin.png13.64 KBgvso

Comments

gvso created an issue. See original summary.

gvso’s picture

Related issues: +#1944038: Common Social API Configuration
StatusFileSize
new13.64 KB

I think these are the routes we will need:

  • A menu link, child of system.admin_config, which will be the parent for Social API related configuration. This must point to a route with path /admin/config/social-api
  • A menu link, child of the first item, which will point to /admin/config/social-api/user-authentication and list all the user-authentication-related submodules
  • A menu link, child of the first item, which will point to /admin/config/social-api/autoposting and list all the autoposting-related submodules
  • All the sub-modules for user authentication must implement their settings form as local tasks link with base route social_api.user_auth
  • All the sub-modules for autoposting must implement their settings form as local tasks with base route social_api.autoposting
gvso’s picture

The Social API has already implemented the above routes and menu links:

social_api.routing.yml

social_api.admin_config:
  path: '/admin/config/social-api'
  defaults:
    _controller: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
    _title: 'Social API'
  requirements:
    _permission: 'access administration pages'
    
social_api.autoposting:
  path: '/admin/config/social-api/autoposting'
  defaults:
    _controller: '\Drupal\social_api\Controller\SocialApiController::localTaskList'
    _title: 'Autoposting settings'
    route: social_api.autoposting
  requirements:
    _permission: 'administer social api autoposting'
    
social_api.user_auth:
  path: '/admin/config/social-api/user-authentication'
  defaults:
    _controller: '\Drupal\social_api\Controller\SocialApiController::localTaskList'
    _title: 'User authentication'
    route: social_api.user_auth
  requirements:
    _permission: 'administer social api authentication'

social_api.links.menu.yml

social_api.admin_config:
  title: Social API settings
  route_name: social_api.admin_config
  parent: system.admin_config
  
social_api.autoposting:
  title: Autoposting settings
  description: Configure autoposting settings
  route_name: social_api.autoposting
  parent: social_api.admin_config
  weight: -20
  
social_api.user_auth:
  title: User authentication
  description: Configure user authentication settings
  route_name: social_api.user_auth
  parent: social_api.admin_config
  weight: -10
gvso’s picture

Status: Active » Needs review

As we have split the project in different modules, the routing definition have been divided.

social_api.routing.yml: http://cgit.drupalcode.org/social_api/tree/social_api.routing.yml

social_post.routing.yml: http://cgit.drupalcode.org/social_post/tree/social_post.routing.yml?h=8.x-1.x

social_auth.routing.yml: http://cgit.drupalcode.org/social_auth/tree/social_auth.routing.yml?h=8.x-1.x

gvso’s picture

Status: Needs review » Fixed

I believe the route and link rules are already good. Any changes will be made through different issues.

gvso’s picture

Parent issue: » #2689415: Social API Roadmap

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.