Skip to content

Move all main page functionality to omnipedia_main_page module

Just about everything in this module that uses the main page functionality can conceivably be moved to the omnipedia_main_page module.

Note this should involve a major version bump for omnipedia_core due to the removal of services which will then be found in the omnipedia_main_page module.

This is currently blocked by #4 (closed). Unblocked!

  • Wiki node main page service
  • Main page cache context
  • Local tasks alter

Wiki node main page service

Just about everything else depends on this/uses it, so this will need to be ported first:

https://github.com/neurocracy/drupal-omnipedia-core/blob/bc16c758b4e5e74f10863452d43514d88fce6ead/src/Service/WikiNodeMainPageInterface.php#L12

https://github.com/neurocracy/drupal-omnipedia-core/blob/bc16c758b4e5e74f10863452d43514d88fce6ead/src/Service/WikiNodeMainPage.php#L21

Main page cache context

https://github.com/neurocracy/drupal-omnipedia-core/blob/bc16c758b4e5e74f10863452d43514d88fce6ead/src/Cache/Context/IsWikiMainPageCacheContext.php#L18

Local tasks alter

These checks for the main page can probably just be removed from these and implemented as counterpart event subscribers in the omnipedia_main_page module:

https://github.com/neurocracy/drupal-omnipedia-core/blob/bc16c758b4e5e74f10863452d43514d88fce6ead/src/EventSubscriber/Menu/WikiNodeEditLocalTaskEventSubscriber.php#L39

https://github.com/neurocracy/drupal-omnipedia-core/blob/bc16c758b4e5e74f10863452d43514d88fce6ead/src/EventSubscriber/Omnipedia/WikiNodeEditNotFoundToAccessDeniedEventSubscriber.php#L39

https://github.com/neurocracy/drupal-omnipedia-core/blob/bc16c758b4e5e74f10863452d43514d88fce6ead/tests/src/Functional/WikiNodeEditLocalTaskTest.php#L81

Node and node storage

These are deprecated and will be removed in the next major version. See #4 (closed) and #19 (closed) for details.

https://github.com/neurocracy/drupal-omnipedia-core/blob/bc16c758b4e5e74f10863452d43514d88fce6ead/src/Entity/NodeInterface.php#L155

https://github.com/neurocracy/drupal-omnipedia-core/blob/bc16c758b4e5e74f10863452d43514d88fce6ead/src/Storage/NodeStorage.php#L70

Edited by Ambient.Impact