LocalGov Drupal Docs
Overview
  • Developers
  • Content designers
  • Designers
  • Contributing
  • Credits System
  • Accessibility
  • Governance
Microsites
Main site
GitHub
Overview
  • Developers
  • Content designers
  • Designers
  • Contributing
  • Credits System
  • Accessibility
  • Governance
Microsites
Main site
GitHub
  • For Developers
  • Getting started
    • Drupal requirements
    • Working with Lando
    • Working with DDEV
    • Debugging with Xdebug
    • Working with Gitpod
  • General configuration
    • Content types
    • Custom modules
    • Image styles
    • Media types
    • Paragraph types
    • Taxonomies
    • User roles
  • Features
    • Services: Technical
    • Alert banners: Technical
    • News: Technical
    • Directories: Technical
    • Location Geo: Technical
    • Subsites: Technical
    • Workflows: Technical
      • Introduction
      • Requirements
      • Permissions
      • Basic Configuration
      • Advanced
      • Useful links
      • Contributors
  • Theme
    • LocalGov Base
    • Regions
    • LocalGov Theme (Deprecated)
    • Skeleton theme (Deprecated)
    • Admin theme (Deprecated)
  • Testing
  • Development workflows
    • Installing and deploying a LocalGov Drupal site
  • Hosting
    • Hosting a LocalGov Drupal site
    • Hosting LocalGov Drupal on Azure
  • Release statuses
    • Release statuses
  • Security
    • Best practice guidance
    • Single Sign-On
  • Quality standards
    • Quality standards: Accessibility
    • Quality standard: Documentation
    • Quality standard: Testing
  • How-tos
    • How to use Gitpod to test modules in the browser

Workflows: Technical

  • Introduction
  • Requirements
    • LocalGov Roles
    • LocalGov Workflow
    • LocalGov Review Date
  • Permissions
  • Basic Configuration
    • LocalGov Review Date
    • Scheduled transitions
  • Advanced
    • LocalGov Roles
  • Useful links
  • Contributors

Introduction

Default editorial workflow for LocalGov Drupal content.

LocalGov Workflows (localgov_workflows) provides a Drupal content moderation workflow, a content approvals dashboard, content scheduling and content preview.

The content workflow consists of draft, review, published and archived states with permissions for the editor, author and contributor roles defined in localgov_roles (a submodule of localgov_core).

Content scheduling uses the Drupal Scheduled Transitions module.

Content preview is provided by the Preview Link and Responsive Preview modules.

LocalGov Review Date (localgov_review_date) is an optional feature.

See also the overview for Content designers

Requirements

LocalGov Roles

core_version_requirement: ^8.8 || ^9

dependencies:
  - role_delegation:role_delegation

LocalGov Workflow

dependencies:
  - drupal:content_moderation
  - drupal:node
  - drupal:views
  - diff:diff
  - preview_link:preview_link
  - responsive_preview:responsive_preview
  - scheduled_transitions:scheduled_transitions
  - localgov_core:localgov_core
  - localgov_core:localgov_roles

LocalGov Review Date

dependencies:
  - drupal:content_moderation
  - drupal:datetime
  - drupal:node
  - drupal:views
  - scheduled_transitions:scheduled_transitions
  - localgov_workflows:localgov_workflows

Permissions

The following roles are defined by the localgov_roles module.

  • Editor - can publish all content
  • Author - can publish their own content
  • Contributor - can draft new content
  • User manager - can add new users and assign roles

Basic Configuration

LocalGov Review Date

The LocalGov Review Date feature has configuration allowing the scheduling of content from one state to another, and allows for setting a per content "Review date".

Content editors can set a review date for each piece of content. On this date a revision of the content with the state of Needs Review will be created automatically. All content in this state will appear in the Needs review tab of the Content Moderation admin view.

  • Admin > Content > Needs review
  • /admin/content/localgov_review

Default Review Date

A site administrator can override the default next review date from a year, to any of the following options:

  • 3 months
  • 6 months
  • 1 year
  • 18 months
  • 2 years
  • 3 years

Update the configuration by visiting:

  • Admin > Configuration > Workflows > LocalGov Review Date
  • /admin/config/workflow/localgov-review-date

Scheduled transitions

To manage which types of content can be scheduled visit:

  • Admin > Configuration > Workflows > Scheduled transitions settings
  • /admin/config/workflow/scheduled-transitions

Advanced

LocalGov Roles

Adding default permissions

Modules that wish to provide default permissions for these roles can implement hook_localgov_roles_default(). An example can be found in the test module tests/localgov_roles_test_one/localgov_roles_test_one.module.

function hook_localgov_roles_default() {
  return [
    // @codingStandardsIgnoreLine
    \Drupal\localgov_roles\RolesHelper::ROLE_CONSTANT => [
      'name of permission',
      'name of another permission',
    ],
  ];
}

If you can be certain that this module is included you can import the namespace with a use statement and don't need to use the fully-qualified name, at which point you can use the alias and drop the codingStandardsIgnoreLine.

Useful links

  • Workflows module Git repository
  • Directories module Issue queue
  • Miro board defining work

Contributors

  • @stephen-cox
  • @Adnan-cds
  • @andybroomfield
  • @finnlewis
  • @ekes
  • Ben Hills-Jones
  • David Siddall
  • Oliver Hannan
  • Tom Steel
  • Will Callahan
  • Maria Young
  • James Hall
Help us improve this page!
Last Updated: 10/12/2021, 7:25:10 AM
Prev
Subsites: Technical